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

Re: Explain explained

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Markus Stocker" <markus(at)wilabs(dot)ch>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Explain explained
Date: 2008-03-04 22:30:31
Message-ID: 25630.1204669831@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Markus Stocker" <markus(at)wilabs(dot)ch> writes:
> On Tue, Mar 4, 2008 at 1:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 2/ Sequential scans seem to me more expensive compared to index scans.
>>> I'm wondering why the sequential scan on individual_name is the first
>>> executed in the plan.
>> 
>> I was wondering that too; it looks like it should be a candidate for an
>> index search.  Datatype problem maybe?  Again, you've not shown us the
>> table definitions...

> I guess this is explained too now, at least partially.

No, I meant it seemed like that should have been an indexscan; fetching
one row via an index should have an estimated cost much less than 400.

What do you get if you just do
explain select * from individual_name where name = 'http://www.University0.edu'
If it still says seqscan, what if you force it with
set enable_seqscan = off?

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Markus StockerDate: 2008-03-04 22:59:45
Subject: Re: Explain explained
Previous:From: Markus StockerDate: 2008-03-04 20:52:30
Subject: Re: Explain explained

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