Dear Chandrashekar, Sorry, I don't understand what is the precompiled query. Would you please help me to descript that?
Thanks for your great help. VK On 9/19/06, Chandrashekar H S <[EMAIL PROTECTED]> wrote:
Hi Are u using precompiled queries? If not try using it... On 9/19/06, PY <[EMAIL PROTECTED]> wrote: > > Hi All, > I have a problem about LIMIT & OFFSET profermance. > Due to the limitation of memory, I could not get all of the query result > at > a time. > In our soluction, we use the LIMIT and OFFSET to avoid the problem of > memory > issue. > > we observed the performance of LIMIT & OFFSET, it looks like a liner grow > of > the response time. In our table, it only has 300~500 records. > > > > Here is the dummy script > Create Table foo(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT); > create index idx_foo on foo(x); > > insert into foo(x) values('text001'); > : > : > insert into foo(x) values('text300'); > > > Select distinct x from foo LIMIT 20 OFFSET 0; Select distinct x from foo > LIMIT 20 OFFSET 20; Select distinct x from foo LIMIT 20 OFFSET 40; Select > distinct x from foo LIMIT 20 OFFSET 60; > : > : > Select distinct x from foo LIMIT 20 OFFSET 280; > > > > Would you please help to tell me how to improve that? > > Thanks for your great help. > > > Thanks, > VK > >