Re: About Access paths

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: About Access paths
Date: 2005-03-06 21:29:29
Message-ID: 20050306212923.GA16839@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Mar 06, 2005 at 10:38:22PM +0200, Ioannis Theoharis wrote:
> in case that one has a table R(att0 int4, att1 int4), an index on att1
> and a query selecting only att1 whith a range condition over att1, then
> the optimal access path for a rdbms would be "INDEX ONLY SCAN", which means
> scan only the index, and not the relation (all the needed information
> exists in index, because the select clause has only the att1 attribute).
> This access path is selected in this case by Oracle.
>
> As far as i can see, postgresql select a simple "INDEX SCAN using index"
> on table.

That's because the index does not hold all the information. So INDEX
ONLY is impossible.

> Is there any tuning that one has to do, in order to make postgresql's
> optimizer to select "INDEX ONLY SCAN" ?
> Or postgresql doesn't support this feature at all?

Nope. There's been discussion, but I wouldn't hold my breath.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ioannis Theoharis 2005-03-06 21:39:05 Re: About Access paths
Previous Message Ioannis Theoharis 2005-03-06 20:38:22 About Access paths