pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Ken Egervari <ken@upfactor.com>
Cc: John Arbash Meinel <john@arbash-meinel.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Help with tuning this query (with explain analyze finally)
Date: Fri, 04 Mar 2005 15:56:25 +0000
Message-ID: <42288529.7000803@archonet.com> (raw)
In-Reply-To: <000e01c5207a$1f668ac0$6a01a8c0@KEN>
References: <001001c51ef4$3849eeb0$6a01a8c0@KEN>
	<200503022152.13211.josh@agliodbs.com>
	<004601c51fbe$828bbb50$6a01a8c0@KEN>
	<200503030935.14537.josh@agliodbs.com>
	<001d01c5204a$b440edf0$6a01a8c0@KEN>
	<4227AA36.2080700@arbash-meinel.com>
	<000e01c5207a$1f668ac0$6a01a8c0@KEN>

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



view thread (26+ messages)  latest in thread

Message-ID: <42288529.7000803@archonet.com>
Permalink:  ../42288529.7000803@archonet.com/
Also on:    postgresql.org/message-id/42288529.7000803@archonet.com

 · 

reply

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: dev@archonet.com, ken@upfactor.com, john@arbash-meinel.com
  Subject: Re: Help with tuning this query (with explain analyze finally)
  In-Reply-To: <42288529.7000803@archonet.com>

* 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