![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have some querys that do something like this. SELECT * FROM tblA where FID IN (SELECT FID FROM tblB where user="BOB" and type=2) AND tblA.type=3 I could change them to SELECT * FROM tblA where EXISTS (SELECT FID FROM tblB where tblA.FID= tblB.FID and user="BOB" and tblB.type=2) AND tblA.type=3 Cannot notice any speed improvement, but cannot be certain how to do a reliable test. How would you advise testing this to get around things that Access/JET caches previous results. |
#3
| |||
| |||
|
|
SELECT * FROM tblA where FID IN (SELECT FID FROM tblB where user="BOB" and type=2) AND tblA.type=3 |
#4
| |||
| |||
|
|
Yitzak <terrysha... (AT) yahoo (DOT) co.uk> wrote in news:47956fb5-93c1-4714-87db- f1f8af167... (AT) z5g2000yqn (DOT) googlegroups.com: SELECT * FROM tblA where FID IN (SELECT FID FROM tblB where user="BOB" and type=2) AND tblA.type=3 "WHERE ... IN" is often inefficient to the extreme. "NOT IN" sometimes finishes but "NOT IN" your lifetime. Air Code: SELECT * FROM tblA INNER JOIN tblB ON tblA.FID = tblB.FID WHERE tblA.type=3 AND tblB.user = 'BOB' AND tblB.type=2 real life -> my tables SELECT * FROM Schools INNER JOIN ActualClassOrganization ON Schools.ID = ActualClassOrganization.School WHERE Schools.HDSBID > 1150 AND ActualClassOrganization.Program = 1 AND ActualClassOrganization.JK = 19 -- lyle fairfield - The man who told us that Canada wouldn't go there has now told us that Canada will be the first to come back. How reassuring! |
#5
| |||
| |||
|
|
On 23 Apr, 21:24, lyle fairfield <lylef... (AT) yah00 (DOT) ca> wrote: Yitzak <terrysha... (AT) yahoo (DOT) co.uk> wrote in news:47956fb5-93c1-4714-87db- Acess/Jet has cached results so next time you do query will be quicker (is my assumption correct?) |
#6
| |||
| |||
|
|
Acess/Jet has cached results so next time you do query will be quicker (is my assumption correct?) |
#7
| |||
| |||
|
|
It would be some kind of interaction with the file system's caching, I think, given that Jet is going to be requesting parts of a file on the remote machine. |
|
I've always found Jet's caching to be mystifyingly successful, |
|
And with a completely incompetent Access programmer. (I used MACROS!!!!!) |
![]() |
| Thread Tools | |
| Display Modes | |
| |