fire-eggs / Danbooru2021

Python scripts and tools for working with the Danbooru2022 data set. Note: this is a sqlite database and a viewer, not directly related to machine learning.
https://www.gwern.net/Danbooru2021
MIT License
42 stars 2 forks source link

Try using BETWEEN for paging #42

Closed fire-eggs closed 3 years ago

fire-eggs commented 3 years ago

Investigate using BETWEEN for getPagedImagesForTag instead of LIMIT.

E.g. something like:

select image_id from images where image_id in 
                   (select image_id from imageTags where tag_id in 
                    (select tag_id from tags where name=?))) 
and image_id BETWEEN ? and ? and hidden = 0 and is_deleted=0
fire-eggs commented 3 years ago

Replaced by issue #46.