Re: Global variables are slowing down the query
- From: "David W. Fenton" <dXXXfenton@xxxxxxxxxxxxxxxx>
- Date: Wed, 10 Aug 2005 14:38:22 -0500
Steve Jorgensen <nospam@xxxxxxxxxxxxx> wrote in
news:902kf1hekurcb11t1rsgt7gg6hhejpsu44@xxxxxxx:
> On Wed, 10 Aug 2005 08:08:06 +0100, Trevor Best
> <nospam@xxxxxxxxxxxxxx> wrote:
>
>>Steve Jorgensen wrote:
>>
>>> Not only would the query not have to determine the types at
>>> run-time, I'm betting it's so slow now because it calls the
>>> function multiple times. Whenever JET has to make calls into a
>>> user-defined function, there's a big time hit.
>>
>>IME if the function has no parameters Access will call it only
>>once. Although I've not used one in the criteria so that may be
>>the difference.
>
> My experience matches yours. I'm just not sure if one can rely on
> that rule in all cases.
If it's in the criteria and it doesn't take an argument why in the
world would the optimizer call it more than once?
Also, having a function in the criteria won't cause all the
processing to be client-side (instead of server-side), since once
the functions have been evaluated, the result can be sent to the
server as the criteria to filter on.
It is only when you have Access functions that *can't* be processed
before sending to the server that everything gets pulled to the
client and processed there. An example would be sorting on a
function. Since the function is client-side, all the data has to be
pulled and sorted. And if there are criteria on a function, same
thing.
--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
.
- Follow-Ups:
- Re: Global variables are slowing down the query
- From: Trevor Best
- Re: Global variables are slowing down the query
- References:
- Global variables are slowing down the query
- From: Jean
- Re: Global variables are slowing down the query
- From: Jean
- Re: Global variables are slowing down the query
- From: David W. Fenton
- Re: Global variables are slowing down the query
- From: Steve Jorgensen
- Re: Global variables are slowing down the query
- From: Trevor Best
- Re: Global variables are slowing down the query
- From: Steve Jorgensen
- Global variables are slowing down the query
- Prev by Date: Re: user function in a query
- Next by Date: Report with totals only, no details
- Previous by thread: Re: Global variables are slowing down the query
- Next by thread: Re: Global variables are slowing down the query
- Index(es):
Relevant Pages
|