Re: How do I browse a database ?

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Sat, 10 Aug 2019 11:01:25 -0400
Message-ID: <qimm7v$d88$1_at_jstuckle.eternal-september.org>


On 8/10/2019 4:15 AM, R.Wieser wrote:
> Jerry,
>

>>> Do you have a link for me so I can take at least a peek ?
>>
>> Sorry, not off hand.  I haven't used SQLite for years.

>
> :-) I was referring to a method that would work for MySQL. Maybe it
> contains some stuff that could be useful - even if it can't be translated
> one-on-one to SQLite.
>
> Currently I've got nothing ...
>
> Regards,
> Rudy Wieser
>
>

[Quoted] Well, you've already ruled out the typical way it's done in MySQL - with "OFFSET" and "LIMIT".

The problem here is the database has to retrieve (but not necessarily return) all data up to the last row requested.

[Quoted] The other problem you run into in creating a temporary table with just [Quoted] unique keys is that if the database changes (rows added/deleted/updated) your temporary table is now out of date, which may or may not be a problem for you.

You can return up or down sorted records from a specific one, even if [Quoted] your search criteria doesn't contain unique data. What you do is add the primary key as the final sort parameter and use the that to find the next rows before or after. The database will still have to retrieve a lot of rows but will only return the requested rows.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Sat Aug 10 2019 - 17:01:25 CEST

Original text of this message