Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news.netfront.net!gonzo.reversiblemaps.ath.cx!not-for-mail From: Jasen Betts Newsgroups: comp.databases.postgresql Subject: Re: JDBC - move cursor forward in a forward only ResultSet Date: 16 Aug 2014 23:36:18 GMT Organization: JJ's own news server Lines: 24 Message-ID: References: NNTP-Posting-Host: 118.90.16.12 X-Trace: adenine.netfront.net 1408233733 95470 118.90.16.12 (17 Aug 2014 00:02:13 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Sun, 17 Aug 2014 00:02:13 +0000 (UTC) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.databases.postgresql:584 On 2014-08-15, Dimitri Fontaine wrote: > Magnus Warker writes: >> I don't know a WHERE-condition to select rows 11-20 from a result set that I >> would have got without this condition. > > http://use-the-index-luke.com/fr/blog/2013-07/pagination-done-the-postgresql-way > http://use-the-index-luke.com/no-offset suppose you want page 500 if 1100 , you'd have to mash next 500 times, if you are ordering on three columns and only the least significant is unique the where gets more complex. where a=$a and ( b=$b and ( c>$c ) or b > $b) or a> $a order by a,b,c dunno if postgres can see how to satisfy that with an index scan or not. one help fpr the first problem is to add in links to significant values of "a" -- umop apisdn --- news://freenews.netfront.net/ - complaints: news@netfront.net ---