Re: Strange Planner Issues - Mailing list pgsql-general

From Greg Stark
Subject Re: Strange Planner Issues
Date
Msg-id 407d949e0907291306x36041bc9k21fdab55c6794cc5@mail.gmail.com
Whole thread Raw
In response to Strange Planner Issues  (Jake Stride <jake@omelett.es>)
List pgsql-general
On Wed, Jul 29, 2009 at 8:01 PM, Jake Stride<jake@omelett.es> wrote:
> Hi,
>
> I have 2 databases running on the same server. One is a dump of the
> other, however the query plans for the same query on the same tables
> in each database is wildly different and I cannot work out why.


>                                ->  Seq Scan on
> person_contact_methods e  (cost=0.00..3281.89 rows=1 width=8) (actual
> time=114.181..114.181 rows=0 loops=1)
>                                      Filter: (main AND
> ((contact)::text ~~* 'jake@omelett.es'::text) AND (type =
> 'E'::bpchar))

>        ->  Seq Scan on person_contact_methods e  (cost=0.00..2942.06
> rows=1 width=8) (actual time=3.718..184.602 rows=772 loops=1)
>              Filter: (("type" = 'E'::bpchar) AND main AND
> ((contact)::text ~~* 'jake@omelett.es'::text))


They don't look like the same data from here. One has no matching
records in this table and the other has over 700.
--
greg
http://mit.edu/~gsstark/resume.pdf

pgsql-general by date:

Previous
From: Jake Stride
Date:
Subject: Re: Query optimisation and sorting on external merge
Next
From: Antonio José García Lagar
Date:
Subject: Re: OID in $_TD->{new}/$_TD->{old}