From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Truman <tim@advam.com>
Cc: 'Dave Dutcher' <dave@tridecap.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Forcing the use of particular execution plans
Date: Tue, 03 Oct 2006 00:19:39 -0400
Message-ID: <19401.1159849179@sss.pgh.pa.us> (raw)
In-Reply-To: <000001c6e6a0$5903b990$0340050a@sdg>
References: <000001c6e6a0$5903b990$0340050a@sdg>
"Tim Truman" <tim@advam.com> writes:
> Here is an "explain analyze" for the query that performs slowly,
This shows that the planner is exactly correct in thinking that all
the runtime is going into the seqscan on transaction:
> "Aggregate (cost=88256.32..88256.32 rows=1 width=0) (actual
> time=55829.000..55829.000 rows=1 loops=1)"
> ...
> " -> Seq Scan on "transaction" t
> (cost=0.00..87061.04 rows=1630 width=349) (actual time=234.000..55797.000
> rows=200 loops=1)"
> " Filter: ((transaction_date >=
> '2005-01-01'::date) AND (transaction_date <= '2006-09-25'::date) AND
> ((credit_card_no)::text ~~ '4564%549'::text))"
Since that component of the plan was identical in your two original
plans ("desired" and "undesired") it seems pretty clear that you have
not correctly identified what your problem is.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, tim@advam.com, dave@tridecap.com
Subject: Re: Forcing the use of particular execution plans
In-Reply-To: <19401.1159849179@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox