From: PFC <lists@boutiquenumerique.com>
To: Mike Rylander <mrylander@gmail.com>
To: Chris Kratz <chris.kratz@vistashare.com>
Cc: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance Tuning
Date: Thu, 10 Feb 2005 04:38:39 +0100
Message-ID: <opslypqpzdth1vuj@musicbox> (raw)
In-Reply-To: <b918cf3d0502091727267dd57d@mail.gmail.com>
References: <6EE64EF3AB31D5448D0007DD34EEB3412A7615@Herge.rcsinc.local>
<200502091730.41997.chris.kratz@vistashare.com>
<b918cf3d0502091727267dd57d@mail.gmail.com>
>> 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...)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@boutiquenumerique.com, mrylander@gmail.com, chris.kratz@vistashare.com, merlin.moncure@rcsonline.com
Subject: Re: Performance Tuning
In-Reply-To: <opslypqpzdth1vuj@musicbox>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox