Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Precedent Load vs Resident Load

Hi Folks, I am trying to create one intermediate QVD and first I tried with Precedent Load:

FINAL_QVD:

LOAD *,

     SubField(A,'.',1) as X,

     SubField(A,'.',2) as Y,

     ApplyMap('MAP_T',AutoNumber(LEFT(A,LEN(A)-3)),'No') as FLAG

;

LOAD DISTINCT A,B,C,D FROM [$(vQVDpath\TEST_CHECK.qvd)] (qvd);

The TEST_CHECK.qvd have 4M rows

For this code I got 4M rows in FINAL_QVD table also. But I am expecting only 1M ditinct rows only.

Again, I re-write my script with Resiednt Load below:

T:

LOAD DISTINCT A,B,C,D FROM [$(vQVDpath\TEST_CHECK.qvd)] (qvd);

FINAL_QVD:

NOCONCATNATE

LOAD *,

     SubField(A,'.',1) as X,

     SubField(A,'.',2) as Y,

     ApplyMap('MAP_T',AutoNumber(LEFT(A,LEN(A)-3)),'No') as FLAG

RESIDENT T;

DROP TABLE T;

With this, I got 1M rows in my new table FINAL_QVD.

I wonder, what is wrong with precedent load

What is the difference b/n Precedent Load & Resident Load

Thanks,

Siri

1 Solution

Accepted Solutions
Employee
Employee

Re: Precedent Load vs Resident Load

Put the distinct clause in the top load statement, and the preceding load will remove the duplicates. A distinct clause in the following load statements will be disregarded.

HIC

5 Replies
whiteline
Honored Contributor II

Re: Precedent Load vs Resident Load

Hi.

Distinct statement is not working this way with Precedent LOAD.

Employee
Employee

Re: Precedent Load vs Resident Load

Put the distinct clause in the top load statement, and the preceding load will remove the duplicates. A distinct clause in the following load statements will be disregarded.

HIC

Not applicable

Re: Precedent Load vs Resident Load

Thanks for Reply HIC....

I wondor, Which load give better performance?

perumal_41
Valued Contributor II

Re: Precedent Load vs Resident Load

Hi,

use Preceding Load ,this one better performance,but resident Load slow script  and slow ur performance

Regards

Perumal A

whiteline
Honored Contributor II

Re: Precedent Load vs Resident Load

Hi.

I think you should make some tests, because it depends.

Just have made some tests with mapping and 6M rows. In my case "optimized QVD load+mapping from Resident" is faster than "loading from QVD and mapping with preceding load".

I guess it's because using preceding load here turns off optimized qvd load.

Community Browser