Pramod wrote: > > Hi, > > we have a View which joins a few tables. > > when we run a select from this view, the query takes a > lot of time to run, following runs of the same SQL > runs pretty fast. > so > select * from myview where id=1 where ID is the > primary key of the driving table. > the above selects takes about 55 seconds to run. > > now the same select run again takes less than 200 ms > > so what gives? > > is there a way to avoid this, any work arounds? any > setup/parameters that we missed.
One reason may be that before doing that first query no data of the tables concerned are in the data cache, i.e. the main memory, i.e. have to be read from disk. The second and the further runs find the pages/the data needed in cache because your data cache is large enough to hold all needed data and no other query is done intermediately which throws some data out because of its own needs. Elke SAP Labs Berlin _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
