Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Thanks for your thoughts Thomas. I ended up doing essentially the same thing, but still within a single select. I dropped the sub-select, and replaced it with just the SUM(E.Field5), then I added another join to include the EFile table, and finished off with an appropriate “group by”.
I did some timing runs, keeping score with “set coverage”. For a base I used a fast (but incomplete) select that simply left out the EFile and EField5 references. I normalize all the times, and got the following results:
1.0 time units - The Base case without EField5 evaluation
8.2 time units - The sub-select version.
1.2 time units - The SUM() + join + “group by” version (described above).
I suspect that your approach would score about the same as my solution.
Bob
Précédent
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