代码之家  ›  专栏  ›  技术社区  ›  Sate Wedos

在Microsoft acces datetime中选择using“=”和using“between”,速度更快

  •  0
  • Sate Wedos  · 技术社区  · 8 年前

    我有两种方法可以使用此代码在特定日期选择一个大表:

    select Per_Code,Date_Time from TA_Record_Info
    where DateValue(Date_Time)=#2017-09-4#
    

    另一种方式是这样的:

    select Per_Code as nik,Date_Time as min from TA_Record_Info
    where Date_Time between '2017-09-4 00:00:00' and '2017-09-4 23:59:59' 
    

    我认为如果使用中间层会更快。这是真的吗?为什么会这样?

    1 回复  |  直到 8 年前
        1
  •  2
  •   iDevlop    8 年前

    a上的过滤(计算) 表示 表格扫描 .