Re: [GENERAL] Indexing problem with OFFSET LIMIT

2008-08-29 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > On Fri, Aug 29, 2008 at 4:38 PM, Oliver Weichhold <[EMAIL PROTECTED]> wrote: >> Consider this query: >> >> SELECT * FROM foo WHERE realm_id = 228 order by foo_name LIMIT 200 OFFSET >> 15000 > try this: > SELECT * FROM foo WHERE realm_id = 228 order b

Re: [GENERAL] Indexing problem with OFFSET LIMIT

2008-08-29 Thread Merlin Moncure
On Fri, Aug 29, 2008 at 4:38 PM, Oliver Weichhold <[EMAIL PROTECTED]> wrote: > Hello > > I have problem in my applications and don't know how to fix it. > > This is the table and one of the indexes: > > CREATE TABLE foo > ( > id serial NOT NULL, > foo_name character varying(100), > realm_id i

Re: [GENERAL] Indexing problem with OFFSET LIMIT

2008-08-29 Thread David Rowley
general@postgresql.org Subject: [GENERAL] Indexing problem with OFFSET LIMIT Hello I have problem in my applications and don't know how to fix it. This is the table and one of the indexes: CREATE TABLE foo ( id serial NOT NULL, foo_name character varying(100), realm_id intege

[GENERAL] Indexing problem with OFFSET LIMIT

2008-08-29 Thread Oliver Weichhold
Hello I have problem in my applications and don't know how to fix it. This is the table and one of the indexes: CREATE TABLE foo ( id serial NOT NULL, foo_name character varying(100), realm_id integer ... and about 50 other columns ) CREATE INDEX idx_foo_name_realm ON foo USING btr