Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Looks like when loading directly from the Database Views(which is created using the same query in qvs) is taking longer time compared to loading the same using a QVS which query against the DB.
Is that how it works?
It would supposed to be the same time.
It depends on
You mean it takes longer to load data from a Database View than it takes to load the same data from the constituent Database Tables?
That's normal. The Database engine has to populate the View before it can start transmitting rows. This is a set-up cost (delay). It has no such problem when reading directly from tables where the optimizer can start transmitting rows almost immediately..
A view (not materialized) is a stored queryn (where stored is the definition of the query, not the result), usually it takes the same time to run
- a query
and
- the same query stored as a view
While loading from a view does take longer, the dynamic nature of a view insures that you are getting the most current version of the data. We are migrating all of our views ( 100's ) to static tables in a data warehouse. Our data requirements do not necessitate more than day old data, so we elected the performance improvement of pulling directly from tables.