Re: TPC-R benchmarks

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: TPC-R benchmarks
Date: 2003-10-02 19:44:12
Message-ID: Pine.LNX.4.33.0310021340350.25184-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 2 Oct 2003, Oleg Lebedev wrote:

> I was trying to get the pg_stats information to Josh and decided to
> recreate the indexes on all my tables. After that I ran vacuum full
> analyze, re-enabled nestloop and ran explain analyze on the query. It
> ran in about 2 minutes.
> I attached the new query plan. I am not sure what did the trick, but 2
> minutes is much better than 2 hours. But then again, I can't take long
> lunches anymore :)
> Is there any way to make this query run even faster without increasing
> the memory dedicated to postgres?
> Thanks.

As long as the estimated row counts and real ones match up, and postgresql
seems to be picking the right plan, there's probably not a lot to be done.
You might want to look at increasing sort_mem a bit, but don't go crazy,
as being too high can result in swap storms under load, which are a very
bad thing.

I'd check for index growth. You may have been reloading your data over
and over and had an index growth problem. Next time instead of recreating
the indexed completely, you might wanna try reindex indexname.

Also, 7.4 mostly fixes the index growth issue, especially as it applies to
truncating/reloading a table over and over, so moving to 7.4 beta3/4 and
testing might be a good idea (if you aren't there already).

What you want to avoid is having postgresql switch back to that nestloop
join on you in the middle of the day, and to prevent that you might need
to have higher statistics targets so the planner gets the right number
all the time.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2003-10-02 19:58:43 Re: count(*) slow on large tables
Previous Message Oleg Lebedev 2003-10-02 19:39:55 Re: TPC-R benchmarks