Search Postgresql Archives

Re: how to speed up query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux