>>>>> "Alain" == Alain Tesio <Alain.Tesio@stripped> writes:
Alain> The "explain ..." syntax is quite useful, but you don't always obvious to guess
Alain> which query is the most efficient. The time isn't always meaningful if you're
Alain> not the single user on the machine. What I'd like to know if the effective
Alain> number of IO accesses made by a query.
Alain> Something like "set statistics io on" on Sybase, here's a typical output :
Alain> Table: MYTABLE scan count 1, logical reads: 2154, physical reads: 2153
Alain> Table: Worktable1 scan count 1, logical reads: 107, physical reads: 0
Alain> Total writes for this command: 0
For the moment we can't give the above details.
You can however get some indication of how good a query is by doing:
(We only have to fix sometimes that when one does 'flush statistics' one only
flushes the thread specific statistics and not the global statistics).