|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Membre habitué
![]() Inscription : mai 2005 Messages : 258 ![]() |
Bonjour,
je viens vers vous car j'ai un petit soucis... j'ai la simple requête suivante Code :
SELECT * FROM COMPTE WHERE ID NOT IN (SELECT COMPTE_ID FROM FACT_COMPTE) En Firebird 1.5, cela prend quelques millisecondes. en firebird 2.0, cela prend un temps monstreux. Après vérification, je remarque que Firebird 2 n'utilise pas les index. Les deux DB sont des copies conformes. Pourquoi Firebird 2 n'utilise pas les index? (j'ai détruit et recréé les index pour être sûr) Comment faire pour qu'il le fasse (comme Firebird 1.5 le faisait). Merci d'avance |
|
|
00
|
|
|
#2 |
|
Expert Confirmé
![]() ![]() ![]() Philippe MakowskiConsultant spécialité Firebird Inscription : mai 2002 Messages : 2 215 ![]() |
Solution : lire les notes de versions, c'est là pour cela
Performance The following changes should be noted as possible sources of performance loss: Existence Predicates NOT IN and ALL May Be Slow Firebird and, before that, InterBase, have produced incorrect results for the logical existence predicates ALL and NOT IN for many years. That problem has bee corrected in Firebird 2.0, but the change means that indexes on the inner tables cannot be used and performance may be slow compared to the same query's performance in V.1.5. “Inner tables” are the tables used in the subquery argument inside an ALL or NOT IN expression. Note NOT EXISTS is approximately equivalent to NOT IN and will allow Firebird to use indexes.
__________________
Philippe Makowski IBPhoenix - Firebird Membre de l'April |
|
00
|
|
|
#3 |
|
Membre habitué
![]() Inscription : mai 2005 Messages : 258 ![]() |
Je l'ai lu puis oublié...
Merci pour l'info. |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com