Re: SourceForge & Postgres - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SourceForge & Postgres
Date
Msg-id 14880.976594390@sss.pgh.pa.us
Whole thread Raw
In response to SourceForge & Postgres  (Tim Perdue <tim@perdue.net>)
List pgsql-hackers
Tim Perdue <tim@perdue.net> writes:
> I thought the hackers team would be interested in knowing that SourceForge,
>  as of Friday evening, is running on Postgres.

Cool!

> I'm running into some places where the query optimizer is not using the right
> indexes, and sometimes does sequential scans on tables.

I assume you've done a VACUUM ANALYZE at least once since loading up
your data?

It'd be useful to see the results of an EXPLAIN for the problem query,
both with and without SET ENABLE_SEQSCAN TO OFF.  Also, it'd be helpful
to see VACUUM's stats for the relevant tables.  You can get those for
a table named 'FOO' with

select attname,attdisbursion,s.*
from pg_statistic s, pg_attribute a, pg_class c
where starelid = c.oid and attrelid = c.oid and staattnum = attnum
and relname = 'FOO';

        regards, tom lane


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: (one more time) Patches with vacuum fixes available .
Next
From: Bruce Momjian
Date:
Subject: Re: (one more time) Patches with vacuum fixes available .