Danbooru2021 icon indicating copy to clipboard operation
Danbooru2021 copied to clipboard

FilterView performance is slow

Open fire-eggs opened this issue 1 year ago • 0 comments

The query when using FilterView is not performant. Mainly because the use of like statements requires scanning the tags table (no useful index possible).

E.g. the following query:

select image_id from images where is_deleted=0 and is_banned=0 and image_id in 
(select image_id from imageTags where tag_id in (select tag_id from tags where name = '%girl%')) order by image_id

takes over 22 seconds to execute (returning 6,260,963 rows).

fire-eggs avatar Jun 05 '24 23:06 fire-eggs