
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Multiple Exists() functions, but still keep optimized load
Hi
If my script contains one Exists funtion, the Optimized load works just fine eg
where Exists(Cost_Ctr_Cde)
if I add an additional Exists function, the load is no longer optimized?
where Exists(Cost_Ctr_Cde)
and Exists(Period)
any suggestions on how to keep the load optimized?
Thanks
- Tags:
- new_to_qlikview

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
where exists(Cost_Ctr_Cde,Period) try this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tied this, but the load is no longer optimized, so really slow...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think only the usage of 'as','alias' keywords (and in your case, 'Exists') does not affect optimized load.
Perhap, since you are using Exists in conjunction with 'and', QlikView isn't treating it as optimized.
You could use Exists twice on the same table (say, Table1) but store this table into a QVD. Drop the table and read the QVD instead. If you are implementing a layered structure, you can even implement this procedure at an earlier stage and read the QVD in this stage.
Hope that helps.
-Khaled


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
You could create a field which is the concatenation of these two field, and do the exists on that. The concatenated field must exist in the qvd so it must be created when the qvd is built. You could drop the concatenated field at the end of the load if it is not required in the final model.
Regards
Jonathan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestions, its a pity that one cant use multiple Exists() functions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrew,
you could do an inner join after the exits in order to keep optimized load:
Table1:
...
where exists(Cost_Ctr_Cde);
inner join(Table1)
load * inline [
Period
your period(s)
];
hth, regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestion. The problem is that Table1 would load all Periods, which is not ideal as we have large amount of data spanning a number of years.
I know there are other ways of doing it, but was determined to find a solution using multiple Exists() functions
