Re: Suggestion for optimization - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Suggestion for optimization
Date
Msg-id 200204080323.g383N3V11695@candle.pha.pa.us
Whole thread Raw
In response to Re: Suggestion for optimization  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne wrote:
> > > Af far as I know Oracle doesn't have any short cut (along the lines of
> > > what is being discussed in this thread) for this operation.  However
> > > Oracle is more efficient in providing the answer than postgres
> > currently
> > > is.  While postgres needs to perform a full scan on the table, Oracle
> > > will only need to perform a full index scan on the primary key if one
> > > exists.  Since the index will likely have much less data than the full
> >
> > Under Postgres, a full index scan is generally more expensive than a full
> > table scan since indices, particularly btree, carry a large amount of meta
> > data and theefore consume more pages.
> 
> Don't forget that Postgres also doesn't store tids in the index, so must

I assume you mean xid here.  tids are in the index or there would be no
way to find the heap row. :-)

> always check with the main table that a row is visible in current
> transaction.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: timeout implementation issues
Next
From: Tom Lane
Date:
Subject: Re: RFC: Restructuring pg_aggregate