|
|
|
|
|
by inshadows
1896 days ago
|
|
I don't understand your point. I don't do any offset. I just pick 500 keys by cursor. insert into temp select id, date from tbl where id >= c_id and date >= c_date order by date desc, id desc limit 500 I don't see doing any offset over the whole dataset. > And we add the cost of materializing the slice (if even just in memory) The alternative is to transfer 400 full rows of data that will be used just to compute pages. > and introducing the potential of DoS-ing our server with this temporary state if we're not careful. I don't see any DoS vector specific to this but I'd be thrilled to learn of one. |
|
So you pick 500 keys and put them into a temp table. Then what? You still have to show a page that's 100 of those 500 keys.
> The alternative is to transfer 400 full rows of data that will be used just to compute pages.
The alternative is the hybrid cursor+offset approach, which doesn't transfer 400 full rows of anything.
> I don't see any DoS vector specific to this but I'd be thrilled to learn of one.
I generate enough sessions to fill your RAM with temp tables.