Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

7 Replies
Not applicable
Author

where exists(Cost_Ctr_Cde,Period) try this

Not applicable
Author

I tied this, but the load is no longer optimized, so really slow...

Not applicable
Author

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

jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks for the suggestions, its a pity that one cant use multiple Exists() functions

Anonymous
Not applicable
Author

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

Not applicable
Author

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