Can I get group by pipelined when grouping by date(timestamp) ?
I am trying to optimize the performance of a query like this:
select date(event_time) date,
agent_id,
sum(duration_days) duration
from rpt_fa_agent_activity
where account_id='account1'
and event_time between '2014-01-14 00:00:00' and '2014-05-21 00:00:00'
group by date(event_time),
agent_id
I created a dedicated projection which is ordered by account_id, agent_id and event_time.
The query plan uses the projection but is doing GROUPBY HASH.
If I remove the date function from the query the plan is with GROUPBY PIPELINED.
Is there a way to get GROUPBY PIPELINED without modifying the query or for a similar query which returns the same results?
select date(event_time) date,
agent_id,
sum(duration_days) duration
from rpt_fa_agent_activity
where account_id='account1'
and event_time between '2014-01-14 00:00:00' and '2014-05-21 00:00:00'
group by date(event_time),
agent_id
I created a dedicated projection which is ordered by account_id, agent_id and event_time.
The query plan uses the projection but is doing GROUPBY HASH.
If I remove the date function from the query the plan is with GROUPBY PIPELINED.
Is there a way to get GROUPBY PIPELINED without modifying the query or for a similar query which returns the same results?
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.