select caching

Question: if we run the same select query twice on a historical database, will q recognize that it is a duplicate and avoid going back to the disk?

I mean:

q)a: select from HDB where date within (“d”$.z.z; -1+“d”$.z.z)
q)b: select from HDB where date within (“d”$.z.z; -1+“d”$.z.z)

Will q recognize that since data for b is already in memory it needn’t go back to the disk?

Thanks!

To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1082)

no, but it will be in all kind of caches including the disks’,
hence it will be much faster the next time around
On 29 Jan 2011, at 11:24, K4 Monk wrote:

> Question: if we run the same select query twice on a historical =
database, will q recognize that it is a duplicate and avoid going back =
to the disk?
>
> I mean:
>
> q)a: select from HDB where date within (“d”$.z.z; -1+“d”$.z.z)
> q)b: select from HDB where date within (“d”$.z.z; -1+“d”$.z.z)
>
> Will q recognize that since data for b is already in memory it needn’t =
go back to the disk?
>
> Thanks!
>
> –
> You received this message because you are subscribed to the Google =
Groups “Kdb+ Personal Developers” group.
> To post to this group, send email to =
personal-kdbplus@googlegroups.com.
> To unsubscribe from this group, send email to =
personal-kdbplus+unsubscribe@googlegroups.com.
> For more options, visit this group at =
http://groups.google.com/group/personal-kdbplus?hl=en.

If you want in-memory caching handled by q, use views