Skip site navigation (1) Skip section navigation (2)

Re: Incorrect row estimates in plan?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgdba <postgresql(at)inbox(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Incorrect row estimates in plan?
Date: 2007-09-26 14:45:14
Message-ID: 20944.1190817914@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
pgdba <postgresql(at)inbox(dot)com> writes:
>             ->  Bitmap Heap Scan on slog  (cost=82.98..6434.62 rows=2870
> width=61) (actual time=50.235..1237.948 rows=83538 loops=1)
>                     Recheck Cond: ((gid = 10000) AND (rule = ANY
> ('{1,2,8,9,10}'::integer[])) AND (CASE WHEN (rule = ANY
> ('{8,9}'::integer[])) THEN destip ELSE srcip END = '192.168.10.23'::inet))
>                     ->  Bitmap Index Scan on slog_gri_idx  (cost=0.00..82.26
> rows=2870 width=0) (actual time=41.306..41.306 rows=83538 loops=1)
>                         Index Cond: ((gid = 10000) AND (rule = ANY
> ('{1,2,8,9,10}'::integer[])) AND (CASE WHEN (rule = ANY
> ('{8,9}'::integer[])) THEN destip ELSE srcip END = '192.168.10.23'::inet))

[ blink... ]  Pray tell, what is the definition of this index?

With such a bizarre scan condition, it's unlikely you'll get any really
accurate row estimate.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Csaba NagyDate: 2007-09-26 14:52:37
Subject: Re: Searching for the cause of a bad plan
Previous:From: pgdbaDate: 2007-09-26 14:22:45
Subject: Incorrect row estimates in plan?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group