Re: Slow Query
| От | Tom Lane |
|---|---|
| Тема | Re: Slow Query |
| Дата | |
| Msg-id | 25184.1188702010@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Slow Query (Shawn <postgres@xmtservices.net>) |
| Ответы |
Re: Slow Query
|
| Список | pgsql-performance |
Shawn <postgres@xmtservices.net> writes:
> The query just ran and here is the basic output:
> UPDATE 15445
> Time: 22121.141 ms
> and
> explain ANALYZE update shawns_data set alias = null;
> QUERY PLAN
> -----------------------------------------------------------------------------------------------------------------
> Seq Scan on shawns_data (cost=0.00..465.45 rows=15445 width=480) (actual time=0.034..67.743 rows=15445 loops=1)
> Total runtime: 1865.002 ms
> (2 rows)
Hmmm ... did you run the real query and the EXPLAIN in immediate
succession? If so, the only reason I can think of for the speed
difference is that all the rows were fetched already for the second
run. Which doesn't make a lot of sense given the hardware specs
you mentioned. Try watching "vmstat 1" and see if there's some
noticeable difference in the behavior.
regards, tom lane
В списке pgsql-performance по дате отправления: