Skip to content

FilterView performance is slow #58

@fire-eggs

Description

@fire-eggs

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdatabase

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions