Druid Scan vs Select Query

Hi All,

I’m new to Druid and trying to use the select and scan queries to get the data from Druid. In my organization we are using Druid select to query and get the data, but we are planning to update the query from Select to Scan, but when we do that I am noticing there’s some difference in the way the result from query. The data range received is delayed by a day. Let say using select am fetching the data to retrieve record of last 3 months ( starting current date to 3 months old ), but when I use scan query, the result fetched is from ( current date -1 day to 3 months old). is this behavior expected ? or Do i need to update any other field in query ? Could someone please provide me insight on this. Thanks !

Hi Varun,

What version of Druid are you on? I think since Druid 0.11 or 0.12, if you are issuing select queries via SQL interface, a scan query will run in background whenever possible and since 0.17, select query is officially removed: https://druid.apache.org/docs/latest/querying/select-query.html
That said, you could try to manipulate the intervals to see if you can get the same results. And if you think it’s a bug in the scan query, please share more details and we will look into it.

HTH,
Surekha