Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
trust_okoroego1
Contributor II
Contributor II

How to avoid loading all QVD into memory

Hi,

I am running a test, and need to read just the first 100 rows from a 40 Million rows qvd file. Using the FIRST key word, the whole data will be loaded into memory first before qlikview will select the first 100 and likely drop the rest.

Is there a way like in SQL select statement to apply the limit and only load 100 record into memory?

Thanks for your support.

13 Replies
vishsaggi
Champion III
Champion III

Can you try like using Debug mode.

Press ctrl+E to open edit script then click on Debug

Then limit the load by 100.

Then click on run.

vishsaggi
Champion III
Champion III

Not sure if this helps may be try like

First 100

LOAD *

FROM yourqvdfilename.qvd(qvd)

Where 1=1;

trust_okoroego1
Contributor II
Contributor II
Author

Hi Vishwarath,

Thanks for your suggestion. I tried but it did not work

regards,

vishsaggi
Champion III
Champion III

What was the issue? Did you try the script I sent you?

trust_okoroego1
Contributor II
Contributor II
Author

Actually based on qlikview design, it is not possible as the where clause can only be applied after the data is loaded into memory. The suggestion of where 1=1 I guess is only effective when losing a qvd to avoid optimized load and rather read the record row by row.

marcus_sommer

On a QVD it's not possible because it's not a classical table else the data are stored within a data-table and multiple symbol-tables (one for each field). If you apply the reduction-logic from the debugger or FIRST on other file-formats like a csv it will stop after loading n records and speed up the whole load-process.

In your case you could use specially created source-files from the preceeding processes - for just a few simple testings it might be more expensive than loading the (reduced) qvd's, so it depends if it will be really helpful.

- Marcus

Miguel_Angel_Baeyens

You can try

LOAD *

FROM File.qvd (qvd) // or any other file

WHERE RowNo() < 100;

marcus_sommer

Good idea. But just tested and it's not faster by loading from a qvd else it adds some overhead respectively  processing to the load and is slower than an optimized load of the whole data.

- Marcus

Miguel_Angel_Baeyens

Then it's using RecNo(). I cannot say for sure but we are using this almost every day on 1GB+ and 2GB+ QVDs just to check that the files are OK.