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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
jjustingkm
Creator II
Creator II

Indexing on Qlik load

I have an app that pulls millions of records from database and indexing takes around 15 minutes after data fetch .The question I have is does DB/tables involved while indexing. I am good with taking some more time on Qlik but trying to reduce the dependency on the database.

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The indexing done by the Qlik Script does not use the DB. It is done at the end of the script and operates only within Qlik on the loaded data. The search index is created to make searches faster when making searches in the UI. 

You can control what fields get indexed by the script by adding script Search Include/Exclude statements to the end of your script. 

Adding Search Exclude statement(s) can make your reload complete faster. It's useful to exclude fields that will not be searched, like table keys. Or in a QVD generator app that has no UI. If a field is excluded and is subsequently searched in the app, it will be indexed on first use.

If you want to release DB resources as soon as possible consider adding script Disconnect statement after your SQL. 

-Rob

 

 

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The indexing done by the Qlik Script does not use the DB. It is done at the end of the script and operates only within Qlik on the loaded data. The search index is created to make searches faster when making searches in the UI. 

You can control what fields get indexed by the script by adding script Search Include/Exclude statements to the end of your script. 

Adding Search Exclude statement(s) can make your reload complete faster. It's useful to exclude fields that will not be searched, like table keys. Or in a QVD generator app that has no UI. If a field is excluded and is subsequently searched in the app, it will be indexed on first use.

If you want to release DB resources as soon as possible consider adding script Disconnect statement after your SQL. 

-Rob

 

 

jjustingkm
Creator II
Creator II
Author

Thank you Rob. We are trying to reduce the load time on the database. So the indexing will have an impact on the database.

What difference the disconnect statement will make, does it mean while indexing also the dbs are not released?

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Disconnect statement will tell the DB to release the connection and return it to the DB connection pool. So if you issue a Disconnect before the end of the script you are telling the DB you are no longer using the connection and it is available for reuse. If you are concerned about DB resources, using Disconnect as soon as the connection is no longer needed is a good idea, as opposed to waiting for the automatic disconnect that happens at script end (or when a subsequent Connect statement is issued)

I don't know if  the "script end" automatic disconnect happens before or after indexing.

-Rob