Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Possible causes of slow query
I have a table with over 900,000 records in it. I have used sys(3054,1) and the query is fully optimized. I also am indexed on deleted(). For example a very simple query like
SELECT id from c3mid where bed = 3
takes 5 to 7 seconds (about the same time it takes to browse the table). The query time is about the same regardless if 10 results or 1,000 results are returned. The are indexes on both ID and bed. If I take a similar table that has only 55,000 records and a similiar query, the result is subsecond.
The large table hasn't be reindexed in about 2 months. It has 600 records added to it per day, rarely any are deleted. Could this be part of the problem?
ENVIRONMENT
PCS: NT4 and Win95 with tables on Netware 4 server with a tons of bandwith.
Fox: VFP6 (SP2)
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement