cancel
Showing results for 
Search instead for 
Did you mean: 

First SELECT on VIEW 5000x slower than 2nd

Former Member
0 Kudos
57

After creating a new VIEW in HANA

    CREATE VIEW myView AS

    SELECT

        ...

    FROM

        ...

we found that the first select on that view

    SELECT * FROM myView;

runs up to 5000 times longer than the 2nd and later SELECTs on that VIEW.

Why does HANA show this behaviour? How can we avoid it? Can we "trigger" a first SELECT / cacheload with a certain SQL-comand (`LOAD myView ALL;` had no effect)?

Accepted Solutions (1)

Accepted Solutions (1)

michael_eaton3
Active Contributor
0 Kudos

It sounds like HANA is unloading the data (from memory) and reloading it, this normally happens when it is short of free memory.

You can see unloads in the alerts and/or trace files.

Michael

Former Member
0 Kudos

Hmm, this should result in an entry in M_CS_UNLOADS, right? There is no such entry for our tables...

Answers (0)