Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

where SQL statement in SQL view or in Qlikview?

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?

2 Replies
Not applicable

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.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

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