What OS? How much RAM does your server have? Etc etc.

What's the likelihood that the data was on disk when you first ran the query, 
and was pulled into the OS cache as a result? Second time round, the OS didn't 
bother to access the disk because it was all in cache ...

Especially if your query is only accessing one file, I'd write a little macro 
in ED to just pull in every record in the file, and then see if your query 
flies the first time.

If it does fly (and if you're on Unix that's especially likely) then it's down 
to OS caching, not UniData. Certainly when I tried writing the file access code 
for MaVerick, I deliberately ignored caching the files on the basis that linux 
would do a better job than I could ...

Cheers,
Wol

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Butera
Sent: 24 September 2007 13:34
To: u2-users@listserver.u2ug.org
Subject: [U2] Internal Cache in Unidata

Can anyone speak factually about internal cache in Unidata?  In short...

I often look at performance and attempt to improve things by changing queries,
using indicies, rewriting source and so on.  In doing so I perform timing and
consistently note that the second time a query is performed, it executes
considerably faster than the first.

As an example, here's the first execution of a series of queries:

SELECT H08.CR.DIV.DATA WITH XCDD.HAMP.CMTE.MEMBER="0202736" time=18ms
SELECT H08.CR.DIV.DATA WITH XCDD.DIV EQ "D2" time=988ms
SELECT H08.CR.DIV.DATA WITH XCDD.REV EQ "P"  time=5ms

And then immediately peforming these again:

SELECT H08.CR.DIV.DATA WITH XCDD.HAMP.CMTE.MEMBER="0202736" time=18ms
SELECT H08.CR.DIV.DATA WITH XCDD.DIV EQ "D2" time=9ms
SELECT H08.CR.DIV.DATA WITH XCDD.REV EQ "P"  time=5ms

To be clear - the difference between 988ms and 9ms is not a typo, it's real.
Likewise this is not the result of server load.  I can consistently reproduce
the above scenario with different queries at different times of the day (and
wee hours of the morning with few users).

I'm not complaining - it's a perfectly good feature - it's just hard to get
accurate timings on things so I often perform queries numerous times and dump
the first few executions.  Of course, this isn't reality as many queries only
get executed once in a blue moon...

--
Jeff Butera, Ph.D.
Administrative Systems
Hampshire College
[EMAIL PROTECTED]
413-559-5556

"But Mom - Daddy knows everything."
                    Catherine Butera
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to