Skip to content

Conversation

@JamesYangJian
Copy link

When we use it for prometheus remote read, we met an issue that if we query data in a period long ago, it will cost such a long time to get the result.

Through the log, we found out that the query condition is as below:

"date >= toDate(1574999700) AND ts >= toDateTime(1574999700) and ts <= toDateTime(1575021600)"

But since the table should be partitioned by date, so, such query condition will seach all records from the start point till now.

So I made this change to make the query condition as below to guarantee clickhouse just search records in the specified range:

"date >= toDate(1574999700) AND ts >= toDateTime(1574999700) and ts <= toDateTime(1575021600) and date<=toDate(1575021600)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant