Re: Performance (was: The New Slashdot Setup (includes MySql server)) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Performance (was: The New Slashdot Setup (includes MySql server))
Date
Msg-id 200005191952.PAA20370@candle.pha.pa.us
Whole thread Raw
In response to Re: Performance (was: The New Slashdot Setup (includes MySql server))  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> "Michael A. Olson" <mao@sleepycat.com> writes:
> > Third, we had to abstract a lot of the hard-coded table scans in
> > the bowels of the system to call a routine that checked for the
> > existence of an index on the system table, and used it.
> 
> The way that we've been approaching this is by switching from hard-coded
> sequential scans (heap_getnext() calls) to hard-coded indexscans
> (index_getnext() calls) at places where performance dictates it.
> 
> An advantage of doing it that way is that you don't have the
> bootstrapping/circularity problems that Mike describes; the code doesn't
> need to consult pg_index to know whether there is an index to use, it
> just has the necessary info hard-coded in.  For the same reason it's
> very quick.

I like hard-coded.  There aren't many of them, last time I looked. 
Maybe 5-10 that need index scan.  The rest are already done using the
catalog cache.

--  Bruce Momjian                        |  http://www.op.net/~candle 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: Tom Lane
Date:
Subject: Re: Performance (was: The New Slashdot Setup (includes MySql server))
Next
From: Tom Lane
Date:
Subject: Re: Re: Heaps of read() syscalls by the postmaster