Acceleration is not used when WHERE [DATETIME] is in the query


We have created a reflection on one of our tables. No joins, no nothing, just a pure aggregate reflection on certain columns.

If I query the table without datetime parameters (“ido” in our case) the reflection is used and the query is accelerated. However, if I include the “ido” datetime WHERE clause, the query is not accelerated.

Granularity is set to “day”, and as you can see from the profiles, the “ido” datetime column is part of the aggregation.

Same thing happened, with a different set of data… I am sure I am missing something but some help would be appreciated.

I attached both profiles for the properly accelerated and the unaccelerated query with datetime filter. (11,9 kB) (23,6 kB)


Let me look into this and get back to you


1 Like

I might have an answer… I changed the granularity from “day” to “original” for the Aggregate Reflection on the Advanced Tab and it looks like its working - the queries are Accelerated properly.

Another problem comes, when I have the Dataset connected to Superset, there is no “Time Grain” option for my Timestamp columns… Since I kept the “original” value at the reflection, my charts are showing down to the “second” scale.

It is the case for the other datetime columns as well, where the reflection is set to “day” (however in these cases the Acceleration is not working).

@balaji.ramaswamy Should I open a separate discussion on the Superset - Time Grain issue?


Thanks for the update, I think having a separate discussion would help, if that is ok with you


No problem. I will open it. @balaji.ramaswamy thanks!

Dremio is now available in the master branch of superset with support for Time Grain. It will be released likely in 0.35.2.

Here are the steps:

  1. pip install sqlalchemy_dremio
  2. Install Dremio’s odbc driver
  3. Clone the master branch of superset and do the required steps to get it to run

Use an URI like: dremio://dremio:dremio123@localhost:31010/dremio