From: Justin Graf <justin@magwerks.com>
To: pgsql-sql@postgresql.org
To: vindex+lists-pgsql-sql@apartia.org
Subject: Re: best paging strategies for large datasets?
Date: Thu, 13 May 2010 09:57:56 -0400
Message-ID: <4BEC0564.7020403@magwerks.com> (raw)
In-Reply-To: <20100513074353.GA19779@apartia.fr>
References: <20100512054144.GA8762@apartia.fr>
<4BEAD6A9.5040906@magwerks.com>
<20100513074353.GA19779@apartia.fr>
On 5/13/2010 3:43 AM, Louis-David Mitterrand wrote:
**snip***
>
>> What do you mean by quite slow??
>>
> Like several seconds. I have to cache the results.
>
Well then i suggest posting the queries to Performance or here and let
us take a look them
don't forget to include the explain/analyze, and number of records in
each table.
>> On a 30K record table count() and query speed should not be a problem..
>>
> This query is a large multi-join of times series data, not a single
> table. And it's not (prematurely :) optimized.
>
> I'm planning a materialized view for it.
>
here read this
http://www.pgcon.org/2008/schedule/events/69.en.html
The question that begs to be asked how big are the tables the query is
accessing??
if its not hundreds of thousands to millions of records or on a stone
age Server , my guess is the query can be improved.
> **snip**
>> RecordCount/Limit = Number of pages
>> CurrentPage = (offset%RecordCount)/Limit
>>
> These simple formulas we bill handy.
>
don't forget to use floor on these in what ever language your
programming in
All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by our proprietary quotation system. Quotations received via any other form of communication will not be honored.
CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other information proprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it addresses. If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately.
Thank you.
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-sql@postgresql.org
Cc: justin@magwerks.com, vindex+lists-pgsql-sql@apartia.org
Subject: Re: best paging strategies for large datasets?
In-Reply-To: <4BEC0564.7020403@magwerks.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