Re: Can this query go faster???
От | Tino Wildenhain |
---|---|
Тема | Re: Can this query go faster??? |
Дата | |
Msg-id | 439568C4.8050601@wildenhain.de обсуждение исходный текст |
Ответ на | Re: Can this query go faster??? (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>) |
Ответы |
Re: Can this query go faster???
|
Список | pgsql-performance |
Joost Kraaijeveld schrieb: > On Tue, 2005-12-06 at 10:52 +0100, Csaba Nagy wrote: > >>Joost, >> >>Why do you use an offset here ? I guess you're traversing the table >>somehow, in this case it would be better to remember the last zipcode + >>housenumber and put an additional condition to get the next bigger than >>the last one you've got... that would go for the index on >>zipcode+housenumber and be very fast. The big offset forces postgres to >>traverse that many entries until it's able to pick the one row for the > > I am forced to translate a sorting dependent record number to a record > in the database. The GUI (a Java JTable) works with record /row numbers, > which is handy if one has an ISAM database, but not if one uses > PostgreSQL. You can have a row number in postgres easily too. For example if you just include a serial for the row number. Cursor would work too but you would need to have a persistent connection. Regards Tino
В списке pgsql-performance по дате отправления: