代码之家  ›  专栏  ›  技术社区  ›  Hellion Sundeep

MS Access数据导出性能很差

  •  1
  • Hellion Sundeep  · 技术社区  · 16 年前

    table 1: AP_Open
    ID  (primary key)
    Vend_No (indexed, dups)
    Vouch_No
    Vouch_date (indexed, dups)
    a bunch of other stuff
    CompanyCode (indexed, dups)
    
    table 2: Vendors
    Vend_No (indexed, dups)
    Vend_Name 
    a bunch of other stuff
    CompanyCode (indexed, dups)
    
    query:
    select ap_open.vend_no, ap_open.vouch_no, ap_open.vouch_date, vendors.vend_name (etc--about 40 fields)
    From AP_Open INNER JOIN Vendors ON (AP_Open.companyCode = Vendors.CompanyCode) AND (AP_Open.Vend_No = Vendors.Vend_No) 
    ORDER BY AP_Open.Vouch_date;
    
    3 回复  |  直到 16 年前
        1
  •  2
  •   David    16 年前

        2
  •  1
  •   Albert D. Kallal    16 年前

    这里一定有什么惊人的错误。我可以导出连接到products表的130000个invoice details项之间的联合查询,整个导出最多需要2秒(可能更少)。

    在这里,你只需要一个小数据集,对于100000条记录和一个不到2秒的查询,最多只需要10秒。几十万张唱片应该不会花这么长时间。

        3
  •  0
  •   Kevin Ross    16 年前

    您是否尝试过使用VBA或宏导出查询?关于要记住的事情,正如apenwarr所提到的,当您打开查询时,它只返回前几页,并且在后台工作以完成其余页的填充,但是当您导出时,它必须首先运行整个查询。

    推荐文章