Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Multiple Exists() functions, but still keep optimized load

where exists(Cost_Ctr_Cde,Period) try this

Not applicable

Re: Multiple Exists() functions, but still keep optimized load

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

Not applicable

Re: Multiple Exists() functions, but still keep optimized load

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

jontydkpi
Not applicable

Re: Multiple Exists() functions, but still keep optimized load

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

Re: Multiple Exists() functions, but still keep optimized load

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

dakohler
Not applicable

Re: Multiple Exists() functions, but still keep optimized load

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

Re: Multiple Exists() functions, but still keep optimized load

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