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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

uptimize split records

I've wrote a application to split records with a EindDatum-BeginDatum (startdate-enddate) > 1 into records per day.

But the application I wrote is to slow. I need to do this for about 500000 records.

Can anyone help me to uptimize my application?

2 Replies
Not applicable
Author

The source data.

pat_agen
Specialist
Specialist

Hi,

see attached qvw.

This will calculate the biggest difference in days in any one record and then only do that many loops on your initial dataset. i transformed the timestamps into just Days to ease calculations. The Satrt and End times are kept as numbers to be interpreted as Timestamp without the Day portion.

the final data set will have Loc (nLoc), a date (nDay).

there are three other fields:

nNbrDays. If different to null means that this record represents the Eindatum timsestamp of the original record. The end time itself will be in the EndTime field.

StartTime: if different to null shows the StartTime and means this record represents the BeginDatum timestamp of the original record.

Assumptions made:

if the interval carrie sthru to the next day the endtimestamp is always 1 secodn less than midnight so no point recording this.

If the interval has carried beyond the first day the Start time is midnight so no point recording this.

Run this against your full dataset and see how it goes.