Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

Is the script performance better if the LOAD statement is not needed for a SQL table?

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.

4 Replies
balabhaskarqlik

It may also depends, on Data volume.

jblomqvist
Specialist
Specialist
Author

Let's say the data volume is "low".

dapostolopoylos
Creator III
Creator III

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".

Father/Husband/BI Developer
balabhaskarqlik

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.