Re: Critical performance problems on large databases - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: Critical performance problems on large databases
Date
Msg-id 3CB702C4.64C1EFE5@nsd.ca
Whole thread Raw
In response to Re: Critical performance problems on large databases  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Critical performance problems on large databases  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian wrote:
>
> Oleg Bartunov wrote:
> > The big issue with LIMIT,OFFSET is that it still use all rows
> > for sorting. I already suggested to use partial sorting to avoid
> > sorting all rows if one selected only first 20 row, for example.
> > It's very important for Web applications because web users usually
> > read first 1-2 pages. Our experimnets have shown 6 times performance
> > win when using partial sorting.
>
> We do have this TODO item:
>
>         * Allow ORDER BY ... LIMIT to select top values without sort or index
>           using a sequential scan for highest/lowest values

It may not be wise to disregard the index if there is one for the ORDER
BY.

JLL

>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

pgsql-general by date:

Previous
From: "Samuel J. Sutjiono"
Date:
Subject: Re: [SQL] Transactional vs. Read-only (Retrieval) database
Next
From: Bruce Momjian
Date:
Subject: Re: Critical performance problems on large databases