markhan
Programmer
- Mar 9, 2011
- 11
Hi all!
Lets see if someone could help me with this...
Database: Access 2000
Indexes for log table: Ix(A,B,C,D) PrimaryKey(D,B,A,C)
I cannot change the index, so I have to use those ones
When im running this query:
it needs many secods to retrieve the data.
I tried to change the where clause using D<'d1' And B='b' And A='a' And C='c' and E>= e
But it even needs more time.
So im not really sure if the SQL is using the indexes defined in the Access Table
So i was looking how to force the SQL to use an expecific Index.
In this case is better IX index than the primary Key Index.
I tried to use something like this: the example is in Msdn library
SELECT * FROM orders (index (0))
WHERE orderid BETWEEN 11000000 and 88000000
But didnt work. It gave Syntax error
I'll appreciate any help.
Thanks in advance.
Kind regards
Lets see if someone could help me with this...
Database: Access 2000
Indexes for log table: Ix(A,B,C,D) PrimaryKey(D,B,A,C)
I cannot change the index, so I have to use those ones
When im running this query:
Code:
SELECT A,B,C,D FROM log WHERE A='a' AND B='b' AND C='c' AND (D<d1) AND E>= e ORDER BY d
I tried to change the where clause using D<'d1' And B='b' And A='a' And C='c' and E>= e
But it even needs more time.
So im not really sure if the SQL is using the indexes defined in the Access Table
So i was looking how to force the SQL to use an expecific Index.
In this case is better IX index than the primary Key Index.
I tried to use something like this: the example is in Msdn library
SELECT * FROM orders (index (0))
WHERE orderid BETWEEN 11000000 and 88000000
But didnt work. It gave Syntax error
I'll appreciate any help.
Thanks in advance.
Kind regards