Search Postgresql Archives

Re: quick question abt pg_dump and restore

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

 



"Josh Harrison" <joshques@xxxxxxxxx> writes:

>  Aggregate  (cost=342178.51..342178.52 rows=1 width=0)
>    ->  Bitmap Heap Scan on person  (cost=3120.72..341806.71 rows=148721 width=0)
>          Recheck Cond: (person_id > 1146000000::numeric)
>          ->  Bitmap Index Scan on person_pk  (cost=0.00..3083.53 rows=148721 width=0)
>                Index Cond: (person_id > 1146000000::numeric)
...
> How does the planner choose the plan?

The short answer is that it looks at the "cost" for all the reasonable plans
it can come up with and picks the plan with the lowest cost.

Scans which return many rows will tend to prefer bitmap index scans (when they
don't do a full sequential scan of the t table) since it avoids random access.


-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's 24x7 Postgres support!

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[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