Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a question about performance.
Let's say you have a LOAD statement on top of a SQL Select statement.
If you do not need to do any changes to the fields from the SQL Select, is the performance better by removing the LOAD statement and loading the fields there again?
Let's say the SQL Select fields data is fine, you do not need to change the field names etc.
It may also depends, on Data volume.
Let's say the data volume is "low".
I belive in your case the SQL statement is enough.
Have in mind that if your data are preety low then you won't see differences in performance with "naked eye".
Load Statement on top of SQL should not be used if not doing any calculations or deriving new fields, this will load the same data.
Ex:
Emp:
Load
*,
Capitalize(ename) AS ename_Formatted,
MonthName(date) AS MonthYear,
Week(date) AS Week;
SQL
Select empid,
ename,
loc,
date
from emp;
The Load statement on top of select statement is used to transform the retrieved data from database, it is not mandatory to use Load statement on top of select statement. We will use when we are doing any calculations or arriving new fields like Above.
SQL statement pulls the dat from DB , and LOAD statement works on top of that data , and performs operations that coded in load statement and stores the results in QlikView.
EX:
SQL
Select empid,
ename,
loc
from emp;
And through this script what should be result
ABC:
Load
*;
SQL
Select empid,
ename,
loc
from emp;
The first example could be a tiny bit faster since it doesn't use a preceding load. The end result is exactly the same since the preceding load in your second example doesn't do transformations or calculations.