Re: Optimizing Sql - unable to use index
From: Misho <stojanovskim_at_dart.net.au>
Date: 21 Jul 2004 06:03:04 -0700
Message-ID: <17e9780.0407210503.6d9b94dc_at_posting.google.com>
Date: 21 Jul 2004 06:03:04 -0700
Message-ID: <17e9780.0407210503.6d9b94dc_at_posting.google.com>
Try something simple first.
If T1 and T2 have primary keys defined, and T2 has a FK to the PK of
T1, try DROPPING the combined index(es) first. Let the DB use PK's
only.
However, if you are trying to select other fields than the ones
indexed, it is normal for the DB to do a full table scan. Try a
COUNT(*) of the query. Does it run faster?
Post a script for the tables, PK's and FK's, and the query. It may
give us some more clues.
Cheers. Received on Wed Jul 21 2004 - 15:03:04 CEST