From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Ken Egervari <ken(at)upfactor(dot)com> |
Cc: | John Arbash Meinel <john(at)arbash-meinel(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Help with tuning this query (with explain analyze finally) |
Date: | 2005-03-04 15:56:25 |
Message-ID: | 42288529.7000803@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 pgsql-performance |
Ken Egervari wrote:
> Let's say we have 200 users signed into the application at the same
> time. The application refreshes their shipment information automatically
> to make sure it's up to date on the user's screen. The application will
> execute the query we are trying to tune every 60 seconds for most of
> these users. Users can set the refresh time to be higher, but 60 is the
> lowest amount so I'm just assuming everyone has it at 60.
>
> Anyway, if you have 200 users logged in, that's 200 queries in the 60
> second period, which is about 3-4 queries every second.
Can you turn the problem around? Calculate what you want for all users
(once every 60 seconds) and stuff those results into a summary table.
Then let the users query the summary table as often as they like (with
the understanding that the figures aren't going to update any faster
than once a minute)
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Ken | 2005-03-04 16:36:26 | Re: Help with tuning this query (with explain analyze finally) |
Previous Message | Ken Egervari | 2005-03-04 05:22:12 | Re: Help with tuning this query (with explain analyze finally) |
From | Date | Subject | |
---|---|---|---|
Next Message | Ken | 2005-03-04 16:36:26 | Re: Help with tuning this query (with explain analyze finally) |
Previous Message | stig erikson | 2005-03-04 15:46:28 | Re: name search query speed |