Re: [SQL] OFFSET impact on Performance??? - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: [SQL] OFFSET impact on Performance???
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A75EC@Herge.rcsinc.local
Whole thread Raw
List pgsql-performance
> Actually, you can if you assume you can "temporarily materialize" that
> view.
>
> Then, you use a join on my_query to pull the bits you want:
>
>   select [big table.details] from [big table],
>   [select * from my_query order by [something] offset 280 limit 20]
>   where [join criteria between my_query and big table]
>   order by [something];
>

I think that's a pretty reasonable compromise between a true
materialized solution and brute force limit/offset.  Still, the
performance of a snapshot materialized view indexed around your query
simply can't be beat, although you have to pay a hefty price in
complexity, maintenance, and coherency.

Merlin

pgsql-performance by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: [SQL] OFFSET impact on Performance???
Next
From: Mitch Pirtle
Date:
Subject: Re: SQL Performance Guidelines