Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i'm fetching data from a sql server. to fetch the data i need a where statement. i have two options:
1. build a view in SQL and let qlikview connect to the view
2. no view in SQL, but putting the where statement in the load script of qlikview.
what is the advantage of each approach? is less data pulled to qlikview if i build the view in SQL? isn't a WHERE in a qlikview load script not much more demanding from the ODBC connection? is it so that all the data is pulled using ODBC and then qlikview excluded them while loading?
what the best practice?
Hi,
You can either put your where condition in SQL view or in QlikView where clause both will be similar in terms fo speed. There could be slight difference which need to be tested to get the real speed.
Amien,
I believe that the WHERE clause will be executed on the SQL server, even if it's coming from QlikView. No extra data will be loaded over the network into QlikView. The difference might be dependent on the existence of the required index. If necessary index exists, then I'd say there is no performance penalty, and that keeping your WHERE logic in QlikView is better, because more of your logic is focused in one place.
On the flip side, if more than one script might use the same WHERE condition, then you are probably better off keeping the logic on the SQL Server and maintaining it once.
just my view - I'm sure there are many others...