List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:February 12 2000 6:32pm
Subject:I'd need something more precise and quantitative than "explain"
View as plain text  
Hi!

>>>>> "Alain" == Alain Tesio <Alain.Tesio@stripped> writes:

Alain> Hello,

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:

FLUSH STATISTICS;
SELECT ....
SHOW STATISTICS;

(We only have to fix sometimes that when one does 'flush statistics' one only
flushes the thread specific statistics and not the global statistics).

Regards,
Monty
Thread
I'd need something more precise and quantitative than "explain"Alain.Tesio11 Feb
  • I'd need something more precise and quantitative than "explain"Michael Widenius13 Feb