Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX?
| От | Matteo Beccati |
|---|---|
| Тема | Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX? |
| Дата | |
| Msg-id | 437484FF.1080809@beccati.com обсуждение исходный текст |
| Ответ на | Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX? (Martijn van Oosterhout <kleptog@svana.org>) |
| Список | pgsql-hackers |
Martijn van Oosterhout wrote: >> I've noticed that sometimes EXPLAIN ANALYZE is much slower than the >> plain query. After investigating I found that it happens when using MIN >> or MAX aggregates. >> >> It seems that the plan outputted is not the optimized one (available >> since 8.1) that is really used when running the plain query. > > It may also be that the overhead of calling gettimeofday() several > times per tuple is blowing the time out. What platform is this? FreeBSD 5.4-RELEASE on an HP DL380 G4. I've also tried to do the same on another machine which has 8.0.3 and FreeBSD 4.9-RELEASE-p3: times for the same query are 15s vs 63s with EXPLAIN ANALYZE. Of course I know 8.0 doesn't optimize min/max the same way 8.1 does. Hope this helps. Best regards -- Matteo Beccati http://phpadsnew.com http://phppgads.com
В списке pgsql-hackers по дате отправления: