Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have used exist function
like this
Division:
LOAD Division,
[Division Number]
FROM QVD\Division.qvd (qvd)
Where Exists([Division Number]);
regards
boby
Thnak you i got solution from
http://www.quickintelligence.co.uk/qlikview-optimised-qvd-loads/
Some examples of things that will cause a non-optimised load are:
- Adding new fields to the table
- Deriving new values from a field in the QVD
- Retrieving a field twice
- Most WHERE conditions
- Joining to an existing in memory table
- Loading data into a mapping table
In contrast the things you are allowed to do are:
- Rename fields
- Omit fields
- Do a simple one field WHERE EXISTS on a field returned in the record set
This sounds hugely restrictive, but then most things you would want to achieve can be coded for. For example, if you need to add fields – do this in the QVD generate routine rather than when reading the QVD. Similarly, if you need to derive a value do this when you generate the QVD also. Even complex WHERE statements can be done by deriving flags or composite keys in the QVD generate routine and then doing a simple WHERE EXISTS on a temporary table (even if that temporary table is just a single row from an in-line table).
In fact, optimised QVD loads with a WHERE EXISTS clause on each subsequent load statement is a simple but effective way of quickly building documents which contain related subsets of data – but that is something for another post.
So, how do you know if your load is optimised? Well, the first way is by noticing it is still running when you return to your desk with a fresh cup of coffee. The other is by checking the load progress dialog. Optimised loads show the text qvd optimized as the data is being pulled from the QVD – in contrast no message is shown when the load is non-optimised.
http://www.quickintelligence.co.uk/wp-content/uploads/2013/02/OptimisedQVD.png
in the above scenario is it optimized load or NON Optimized load.
Regards
Mahesh
Good job.
Is there any problem with this?
Peter
Edit: Unoptimized. You're filtering QVD records, therefor QlikView cannot load the QVD en bloc, but has to evaluate every single record.
What is your issue about?
Using the exists as this, it will only load the records for the first division number read !
EXISTS does not affect qvd optimization.
Thnak you i got solution from
http://www.quickintelligence.co.uk/qlikview-optimised-qvd-loads/
Some examples of things that will cause a non-optimised load are:
- Adding new fields to the table
- Deriving new values from a field in the QVD
- Retrieving a field twice
- Most WHERE conditions
- Joining to an existing in memory table
- Loading data into a mapping table
In contrast the things you are allowed to do are:
- Rename fields
- Omit fields
- Do a simple one field WHERE EXISTS on a field returned in the record set
This sounds hugely restrictive, but then most things you would want to achieve can be coded for. For example, if you need to add fields – do this in the QVD generate routine rather than when reading the QVD. Similarly, if you need to derive a value do this when you generate the QVD also. Even complex WHERE statements can be done by deriving flags or composite keys in the QVD generate routine and then doing a simple WHERE EXISTS on a temporary table (even if that temporary table is just a single row from an in-line table).
In fact, optimised QVD loads with a WHERE EXISTS clause on each subsequent load statement is a simple but effective way of quickly building documents which contain related subsets of data – but that is something for another post.
So, how do you know if your load is optimised? Well, the first way is by noticing it is still running when you return to your desk with a fresh cup of coffee. The other is by checking the load progress dialog. Optimised loads show the text qvd optimized as the data is being pulled from the QVD – in contrast no message is shown when the load is non-optimised.
http://www.quickintelligence.co.uk/wp-content/uploads/2013/02/OptimisedQVD.png
A single parameter exists() is an OPTIMIZED load. So this one is optimized. Two parameter exists() is un-optimized.
I think you can assume that the set of [Division Number] was read in a an earlier LOAD.
-Rob
How does QT do this? Preload the entire QVD and then remove in-memory the rows it doesn't need?
I'm not sure how it's done. But that sounds like a good theory.
-Rob