-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Original comment by @astefan:
At the moment, a query like SELECT name,page_count,release_date AS DATE,my_boolean,SCORE() FROM library WHERE name='NULL' AND release_date>='1800-06-02' AND release_date<='2011-06-02' AND price>10.0000 AND match(name, 'dune') AND match(author, 'dan') AND match(author, 'frank') ORDER BY SCORE() (a series of simple AND statements) gets translated to something like LINK REDACTED, meaning a bunch of nested bool statements which basically have one filter statement per bool, except the very first condition after WHERE.
That long list of nested bools could have been written in a more compact way like LINK REDACTED. For now, I don't know if performance-wise there is any difference, but I'll update this issue with more details when I do find out. Even if there would be comparable from performance point of view, the second approach is much more compact/readable.