Re: Performance Tuning

From: PFC <lists(at)boutiquenumerique(dot)com>
To: "Mike Rylander" <mrylander(at)gmail(dot)com>, "Chris Kratz" <chris(dot)kratz(at)vistashare(dot)com>
Cc: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance Tuning
Date: 2005-02-10 03:38:39
Message-ID: opslypqpzdth1vuj@musicbox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>> 2. Moving to more materialized views and prepared statements where we
>> can.
>
> Definitely worth investigating. I wish I could, but I can't get my
> customers to even consider slightly out of date stats.... :(

Put a button 'Stats updated every hour', which gives the results in 0.1
seconds, and a button 'stats in real time' which crunches 10 seconds
before displaying the page... if 90% of the people click on the first one
you save a lot of CPU.

Seems like people who hit Refresh every 10 seconds to see an earnings
graph creep up by half a pixel every time... but it seems it's moving !

More seriously, you can update your stats in near real time with a
materialized view, there are two ways :
- ON INSERT / ON UPDATE triggers which update the stats in real time
based on each modification
- Have statistics computed for everything until some point in time (like
an hour ago) and only compute and add stats on the records added or
modified since (but it does not work very well for deleted records...)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jaime Casanova 2005-02-10 05:49:10 Benchmark
Previous Message Christopher Browne 2005-02-10 03:09:29 Re: Performance Tuning