Re: PhpBB 3.x query review

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Jean-Michel Pouré <jm(at)poure(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PhpBB 3.x query review
Date: 2008-01-07 17:23:54
Message-ID: dcc563d10801070923w7530ddc0t9689b1830b55e5cb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jan 7, 2008 11:06 AM, Jean-Michel Pouré <jm(at)poure(dot)com> wrote:
> Dear friends,
>
> I am reviewing some of PhpBB 3.x queries.
> This allows me to learn more about PostgreSQL.
>
> The thread can be read here:
> http://area51.phpbb.com/phpBB/viewtopic.php?f=3&t=29260
>
> Do not hesitate to post your review there.
>
> In pg_tables, I saw that there was an extensive use of sequential scans
> in phpbb_banlist, a small table of 60 rows.

What makes you think a seq scan is bad here? Have you compare the
output of explain analyze of the select with enable_seqscan on and
off? I'm willing to bet seqscan is a win here. 60 rows probably fits
in one page, maybe two or three. I can't imagine the random access of
a index lookups beating sequentially scanning a few pages of data.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel Pouré 2008-01-07 17:29:44 calculating shared data memory space
Previous Message Eric D Nielsen 2008-01-07 17:10:39 Re: Server doesn't seem to be listening...