1. 9
  1.  

  2. 3

    What did your query plan look like? Did you consider a materialized view or any other technique that’d let you solve this in the database?

    1. 2

      I also was curious if they’d exhausted the SQL options. Appears from the brief Group Builder example, they could’ve generated raw SQL queries that hit all the right indexes, without doing the unions and group by.

      As a query builder, this Group Builder looks pretty slick. The technical discussion about their history and solutions is also interesting and instructive. The Go language propaganda is kind of distracting from an other wise interesting article. Not saying that Go didn’t provide the benefits described, it just seems a little irrelavant.

      1. 2

        It looks to me as if they are just constructing boolean expressions in the web interface, e.g., the first screenshot corresponding to (as far is I understand it):

        ...
        WHERE gender != 'male' AND ( age > 50 OR censor_rating_r18 < 0.2 )
        

        (it’s not clear to me how they actually store/process the censor rating, so i’m just guessing here)

        So it’s a matter of translating from the interface to a boolean expression with “Subgroup”s mapped to parentheses and comparisons based on exclude/include specification.

        I don’t really see the necessity for unions, or am I missing something?