Jump to last page of results in SQLyog

How can I jump to the last page of results in SQLyog?

I'm looking for something fast, like a shortcut or a button to click.

enter image description here

In the previous image I have this table with millions of results, if I uncheck "Limit rows" (yellow arrow) it gets stuck because it's too much data, if I change "# of rows" (blue arrow) for a bigger number I still have too many pages and with a large number it gets stuck too. So I have to use the small arrow button (green arrow) but it takes an eternity even with a bigger number in "# of rows".

Finally, I cannot use LIMIT or DESCENDING because I need to check the whole dataset, I need to move from the beginning to the end of the table without visiting every single page in the middle, but sometimes I will need to visit those data pages.

Upvotes: 0

Views: 69

Answers (1)

user2834566
user2834566

Reputation: 805

Depends upon what you mean by the 'last' page. I'm sure you already know there is no inherent order to a table. The way I move from the first page of rows to the last page for big tables in order to move to the rows inserted last i.e. the ones with the highest PK, is to click the title of the PK to sort the table in reverse order of PK. The sort is very fast.

Its looks like you have an id field. so click that to sort the output in descending order of id to see the last pages and click it again to see the first pages.

On the other hand, if there is some meaning about the first rows and the last rows then perhaps introduce a new field into the table that is calculated according to whatever algorithm you define as your 'order', so that the rows inserted first have a low calculated value, as do the ones inserted last but the ones in the middle have a high value.

eg. if you used the insert date you could calculate that records inserted before 2015 have a sort value of 1, those between 2015 and 2000 have a value of 3 and those later than 2000 have a value of 2. Sorting by that field will then show your first and last 'page' in the top rows.

Upvotes: 0

Related Questions