Search Postgresql Archives

Re: best way to query

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

 



Steve Clark <sclark@xxxxxxxxxxxxx> writes:
> explain shows:

>   Aggregate  (cost=4712921585.30..4712921585.31 rows=1 width=0)
>     ->  Seq Scan on t_event_ack_log a  (cost=103170.29..4712920878.60 
> rows=282677 width=0)
>           Filter: (NOT (subplan))
>           SubPlan
>             ->  Materialize  (cost=103170.29..117301.92 rows=1016163 
> width=4)
>                   ->  Index Scan using pk_tuel_eln on t_unit_event_log 
>   (cost=0.00..98184.12 rows=1016163 width=4)

Yeah, that's going to suck.  A brute force solution is to see if you
can get it to switch to a "hashed subplan" by increasing work_mem.

Also, whatever is the ORDER BY for?

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[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