Re: Help with tuning this query (with explain analyze finally)
| От | Richard Huxton |
|---|---|
| Тема | Re: Help with tuning this query (with explain analyze finally) |
| Дата | |
| Msg-id | 42288529.7000803@archonet.com обсуждение исходный текст |
| Ответ на | Re: Help with tuning this query (with explain analyze finally) ("Ken Egervari" <ken@upfactor.com>) |
| Список | 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
В списке pgsql-performance по дате отправления: