Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

S...L...O...W..... Min/Max

I have the below calculation running against a "telemetry" data set. That data set is about 300 million rows, and all time-series.

LOAD 

               min([CalendarDate]) as minDate, 

               max([CalendarDate]) as maxDate 

Resident telemetry;

Any thoughts on how to get the above query (or alternative) to run in say a couple of minutes or less instead of many hours?

Clarification: the above slowness occurs even if the number of records is limited to say 30M. The last run was, I believe, over 6 hours long.

Message was edited by: Chris Kelley

10 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Chris,

I used the following approach:

1. Get Min/Max Date from database, store it and use it. Usually it's much faster.

2. Common Sense:

2.1 If you know that you will always have dates in the future you can basically calculate Min value one time only and hardcode Min value.

2.2. If you know that you have values not bigger than Today OR Today plus one month OR Last day of current year, you also can calculate it without Min/Max, but from Today

Regards,

Sergey

Regards,
Sergey