Hi~ we noticed that in the generated SQL for exper...
# announcements
h
Hi~ we noticed that in the generated SQL for experiment. it’s running slow for large tables. as you see the subquery didn’t have a timestamp filter on it. so is there a way that we can config on GB side to just add that timestamp filter on? or is it should be part of the generated query.
Copy code
SELECT
    user_id as user_id,
    1 as value,
    m.timestamp as conversion_start,
    m.timestamp as conversion_end
  FROM
    (
      SELECT
        distinct dec_user_id as user_id,
        created_at as timestamp
      from
        events.track_all
      where
        event_category = 'Foo'
        and event_action = 'Bar'
        and event_label = 'Action'
        -- Expect here has timestamp filter to speedup this subquery
        -- and timestamp >= toDateTime('2022-08-24 00:00:00')
    ) m
  WHERE
    m.timestamp >= toDateTime('2022-08-24 00:00:00')
f
🙌 1
h
That’s what I’m expected! Thanks for this