Re: how to speed up query

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: how to speed up query
Дата
Msg-id f4j0kb$2cpm$1@news.hub.org
обсуждение исходный текст
Ответ на Re: how to speed up query  (Andrew Sullivan <ajs@crankycanuck.ca>)
Список pgsql-general
> We don't know.  You don't tell us what version you're running, show
> us any EXPLAIN ANALYSE output, tell us about the data. . .

explain analyze delete from firma1.rid where dokumnr not in (select dokumnr
from firma1.dok)

produces

"Seq Scan on rid  (cost=7703.59..98570208.00 rows=101210 width=6) (actual
time=7269933.877..7269933.877 rows=0 loops=1)"
"  Filter: (NOT (subplan))"
"  SubPlan"
"    ->  Materialize  (cost=7703.59..8537.22 rows=55963 width=4) (actual
time=0.007..18.707 rows=25313 loops=202421)"
"          ->  Seq Scan on dok  (cost=0.00..7373.63 rows=55963 width=4)
(actual time=40.236..3353.985 rows=56079 loops=1)"
"Total runtime: 7269944.251 ms"

As I understand this took 2.2 hours to run

Andrus.


В списке pgsql-general по дате отправления:

Предыдущее
От: Gino.Barille@gmail.com
Дата:
Сообщение: Re: Full vacuum may reclaim space
Следующее
От: Timasmith
Дата:
Сообщение: how to enforce index usage with +0