Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
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?
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