Adding more indexes mess up Queryes 
Author Message
 Adding more indexes mess up Queryes

(D1)
I tryed to improve queryes adding some indexes to some fields.
Indexing made querys much faster, but some of queryes fails after
indexing.

I have two Dbase 4 tables with fields:

TableA:

F1+ ,  F2++

TableB:

C1 , C2

And those are linked: F1 = C1

+ index made when table were created
++ index added to improve result time

Query looks like this:

SELECT TableA.F1, TableA.F2, TableB.C1, TableB.C2
FROM TableA, TableB
WHERE TableA.F1 = TableB.C1 and TableA.F2 = 5555

Before indexing
Both returns same sets

After indexing
DateBaseDesktop returns 4 rows - just like before indexing
delphi app (TQuery) returns empty result set

What could this be?

:) Marko



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding more indexes mess up Queryes

Try the following

SELECT TableA.F1, TableA.F2, TableB.C1, TableB.C2
FROM TableA LEFT OUT JOIN TableB ON TableA.F1 = TableB.C1
WHERE TableA.F2 = 5555

it should work.

Best regards.

Quote:

>(D1)
>I tryed to improve queryes adding some indexes to some fields.
>Indexing made querys much faster, but some of queryes fails after
>indexing.

>I have two Dbase 4 tables with fields:

>TableA:

>F1+ ,  F2++

>TableB:



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Graphical Mess Ups

2. Adding Secondary Indexes without a Primary Index

3. New UPS System 6-8 Hours Continuous Service

4. Ups and Downs of OOP

5. Ups and Downs of OOP

6. MS SQL6.5 Lock ups

7. adding field to the main index

8. using TIndexDefs add to create index for table

9. Adding records to indexed Pdx table

10. Dbase Table Level Changed when adding single field index

11. Add a secondary index to a database in runtime

12. add expression index to dbf file

 

 
Powered by phpBB® Forum Software