On Tue, May 16, 2006 at 04:36:36PM +0530, Gurjeet Singh wrote:
> If a big JOIN query takes N minutes on MS SQL Server, and I wish
> to see the plan why it is taking that long, one would expect me to
> enable 'Show Execution Plan' in the SQL Query Analyzer (similar to
> PG's EXPLAIN ANALYZE). And when I do that, the query now takes more
> than 2*N minutes to come back. I assume this extra delay is caused by
> the overhead of extra processing it does at row-source level (like how
> many rows passed through this row-source, average row-size, etc.).
I posted a patch last week on -patches which should dramatically cut
the overhead of EXPLAIN ANALYZE. Perhaps you could try that and report
your experience.
http://archives.postgresql.org/pgsql-patches/2006-05/msg00158.php
BTW, just showing the plan takes no time at all, just use EXPLAIN
without the ANALYZE.
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.