views:

60

answers:

0

Hi,

I'm supporting a customer with strange, very specific mdb access slowdowns. We have a big ( > 100MB) mdb file which is read by our app through ADO, and on some Vista machines (and only on those Vista machines), some, but not all queries take a very long time to execute.

The slow query:

SELECT * FROM [Table] WHERE [FieldA] = _number_ ORDER BY [FieldB];

The slowness depends on the value of the number, and on the number of fields returned by the query.

the 'fast' numbers can return 120 000 rows in 1-5s, while the 'slow' ones take up to 5 minutes to retrieve ~15000 rows.

Simplifying the query to:

SELECT TOP X [FieldC] FROM [Table] WHERE [FieldA] = _number_; 

pinpoints the slowdown at X hovering around 5000. Additionally, the slowness threshold gets lower with each query execution.

The field is indexed, the query plan (using JETSHOWPLAN) is always the same:

- Inputs to Query -
Table 'Table'
- End inputs to Query -

01) Restrict rows of table Table
      using rushmore
      for expression "[FieldA]=5"
02) Compute Top of result of '01)'

Miscellaneous info:

  • Database is accessed locally, via a separate test application
  • Rows are retrieved with: Recordset->Open(Command, _variant_t((IDispatch *) m_pConnection, true), adOpenStatic, adLockReadOnly, adCmdText);
  • The system language for these machines is Dutch.
  • The Connection object properties are almost identical to mine ( Provider Version: mine: 04.00.9756 theirs: 04.00.9753, and et OLEDB:Compact Reclaimed Space Amount: mine: 0 theirs: 4096).

Does anyone have any idea what might cause the slowdown? I'm frankly at my wits end. If you have any ideas for test cases which could be ran on those machines I would be grateful, as I have only limited remote access to their desktops.