8 Replies Latest reply: Nov 13, 2014 7:49 AM by rakesh goud RSS

    best practice: LOAD * SQL SELECT [field1,2,3..] or LOAD [field1,2,3..] SQL SELECT *?

      I am rather new to Qlikview and I'm building some report, fetching data from a ODBC database.

       

      In the name of efficiency and diminishing the workload for servers (and also incrementing the speed of fetching data), what is the best option when just certain fields (eventually with some criteria, e.g. just date=current year) are needed?

       

      Option A

       

      LOAD Order,

      Item,

      Date

      WHERE Date > 20120101;

       

      SQL SELECT *

      FROM EUrope.Orders

       

      Option B

       

      Load *

       

      SQL SELECT Order, Item, Date

      FROM EUrope.Orders WHERE Date > 20120101;

       

      In words, SQL-selecting everything, and then loading what needed, or SQL-selecting what needed and loading everything (where "everything" is just equal to the SQL selection)?

       

      Logically, I would guess that Option B is more efficient, as you are just handling, from the very beginning, what you just need. But here on QlikCommunity I see many, many scripts that are more similar to Option A...

       

      Many thanks for helping me in shedding some light on this (elementary but, I think, critical) topic!