I know for DB2 you can use

SELECT * FROM AAAA FETCH FIRST 5 ROWS ONLY

and if u want the last 5 row use

SELECT * FROM AAAA desc FETCH FIRST 5 ROWS ONLY

I think mysql is select * from aaaa limit 5

Not sure if this will help at all and i may be outta line  :)

Mike D
----- Original Message ----- 
From: "Scott Cadillac" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 28, 2003 10:35 PM
Subject: RE: Witango-Talk: Search reterivial follow up


D'oh!

Thanks Dude. I think you and Ben are correct, and I'm just remembering my
facts wrong.

It was explained to me a very long time ago by someone at the last Pervasive
Conference that the paging was handled by the ODBC Driver, and now when I
rub my shinny bald head a fuzzy memory comes back to me about a discussion
on the Private Beta list for v5 that clarified this point.

So yes, the speed of this operation is dependant on filtering the queried
array in memory. The larger the potential dataset, the slower the operation.

I know that some Databases can support similar features to the "Limit to"
and "start retrieval" properties directly in the SQL Statement - which
obviously would be more efficient.

For example, SQL Server has a keyword called "TOP" which returns just a
specified number of records. Example:

"SELECT TOP 10 somefield FROM sometable" returns only 10 records when in
fact there are more.

I'm sure there must be a "start retrieval" equivalent, but just can't think
of it right now.

Sorry for any confusion that I caused, and thank you....

Scott Cadillac,
Witango.org - http://witango.org
403-281-6090 - [EMAIL PROTECTED]
--
Information for the Witango Developer Community
---------------------

XML-Extranet - http://xml-extra.net
403-281-6090 - [EMAIL PROTECTED]
--
Well-formed Development (for hire)
---------------------


> -----Original Message-----
> From: Web Dude [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 2:55 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Witango-Talk: Search reterivial follow up
>
>
> I have found the same result as Ben when using the search builder. In
> fact, if you turn debug on you can see the variables being loaded.
> If you have 500 items and list only 2 per page, then start scrolling
> through the pages, you will notice that the variable
> local$search_vals_HTML keeps appending <input type="HIDDEN"
> Name="function" value="list"> After scrolling through 10 pages of
> lists you end up with....
>
> local$search_vals_HTML=<input type="HIDDEN" Name="function"
> value="list"> <input type="HIDDEN" Name="function" value="list">
> <input type="HIDDEN" Name="function" value="list"> <input
> type="HIDDEN" Name="function" value="list"> <input type="HIDDEN"
> Name="function" value="list"> <input type="HIDDEN" Name="function"
> value="list"> <input type="HIDDEN" Name="function" value="list">
> <input type="HIDDEN" Name="function" value="list"> <input
> type="HIDDEN" Name="function" value="list"> <input type="HIDDEN"
> Name="function" value="list"> <input type="HIDDEN" Name="function"
> value="list"> <input type="HIDDEN" Name="function"
> value="list"><input type="HIDDEN" Name="function" value="list"><input
> type="HIDDEN" Name="function" value="list"><input type="HIDDEN"
> Name="function" value="list"> <input type="HIDDEN" Name="function"
> value="list"> <input type="HIDDEN" Name="function" value="list">
> <input type="HIDDEN" Name="function" value="list"> <input
> type="HIDDEN" Name="function" value="list"> <input type="HIDDEN"
> Name="function" value="list"> <input type="HIDDEN" Name="function"
> value="list">  <input type="HIDDEN" Name="function" value="list">
> etc. etc. etc. etc.
>
> If you have 1000 records and are try to display 5 per page, it can
> get extrmely slow. Pretty soon it can take minutes for the next list
> to display. Has anyone else found this? I just noticed it when doing
> some testing...
>
> Does anyone have a work around for this?
>
>
>
> >Witango is taking the results and placing them in a variable (file on
> >server) and then starting at 1 counting to 100 and sending
> that to the
> >browser. This works very quickly, but as you get farther away from
> >record 1 it takes longer to sequentially count down the file.
> >
> >Ben Johansen - http://www.pcforge.com
> >Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
> >Authorized MDaemon Mail Server Reseller
> >http://www.pcforge.com/AltN.htm
> >
> >
> >-----Original Message-----
> >From: Ted Wolfley [mailto:[EMAIL PROTECTED]
> >Sent: Monday, July 28, 2003 12:02 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: Witango-Talk: Search reterivial follow up
> >
> >
> >I just ran an experiment with about 50,000 records,
> retrieving 1000 at a
> >time.  I had the same results so it isn't the quantity of
> records, it's
> >when
> >page 10 + (10,000+ records) is retrieved.
> >
> >Anyone have any ideas?
> >
> >Ted
> >-----Original Message-----
> >From: Ted Wolfley [mailto:[EMAIL PROTECTED]
> >Sent: Monday, July 28, 2003 2:10 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: Witango-Talk: Search reterivial
> >
> >
> >Hi,
> >
> >In a search action, I am retrieving 1949 records in
> alphabetical order,
> >100
> >records at a time.  The first 1000 records (10 web pages)
> are returned
> >quickly. It is after the 1000 record that performance goes down hill
> >with
> >each sequential page taking longer.   Does any one know why
> this would
> >be
> >happening and how to improve performance?
> >
> >Ted
> >_____________________________________________________________
> ___________
> >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> >_____________________________________________________________
> ___________
> >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> >
> >_____________________________________________________________
> ___________
> >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
>
>
> -- 
> ______________________________________________________________
> __________
> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
>

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to