Re: where clause



On Jun 18, 10:03 am, "vanderghast" <vanderghast@com> wrote:
It is said that Jet bring the required INDEXes locally, if there are any,
and only if required, bring the values from the records. If you have no
where clause, indeed, the million of records could ***eventually*** be
brought, ASYNCHRONOUSLY, to the front end: you will be able to see the first
ones almost instantaneously, and the other records are fetched by another
working thread not necessary locking the User Interface... but if you make a
move to last record, that may then take some time. As far as queries
embedded in queries, I suspect that depends on the nature of the queries,
mainly to the join they use, if they use any.

A concept that may help to understand is  to note that Jet evaluates the
SELECT clause on a just-in-time strategy:

SELECT id,
    MyVBAfunction( id ) AS computedStuff
FROM ...

It will consume execution time for the vba function only if the record is
'visible'  to the application... and won't cache it. It will be re-executed
if the record become visible once more (through a recordset active record
pointing to it, or through a form now displaying the record a second time),
so I suspect Jet also fetches the values of the record only on a strict
just-in-time strategy, so you will very unlikely have all your million
records 'locally', even if it is possible, if they are part of a correlated
sub-query, as example. Move the VBA function to the WHERE clause, and now,
dependant of its position in the WHERE clause, that function ***could*** be
executed for each and every record (unless the AND-ed construction has
already dismissed the record... note that Jet seems to evaluate the WHERE
clause from left to right, so add the 'expensive' tests at the end of the
AND sequences).

So, in short, sorry for the savorless answer, but "it depends".

"inungh" <inu...@xxxxxxxxx> wrote in message

news:b5f65f81-7e7d-4723-977a-c87e5f9e1c76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



I have a table which has millions records.

I understand that I need put WHERE clause which are index fields to
limit records and improve performance.

I would like to know does Access really bring the records only to
front end application depends on the WHERE clause or bring millions
records to front end application and doing analyze at front end
application?

If yes, it should help perfromance the stack queries like one query
use another query as source if previous query to limit recrods.

your information and help is great appreciated,- Hide quoted text -

- Show quoted text -

Thanks millions for the information and helping,
.



Relevant Pages

  • Re: Official Status of SQLServer 2005 ADP
    ... "remains with Jet and linked tables or remains with Jet ... but go with SQL pass-through queries and unbound forms" ... RecordSource is a query with a where clause that limits the number of rows ... > queries under MDB was bad and worst than the one offered by ADP while you ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Error 3420 Object invalid or no longer set under Vista
    ... Sometimes the JET optimizer does not run the subquery to completion. ... Problem is in the ORDER BY statement of the problem query below ... draws from 2 other queries, the problem could be lower down. ...
    (microsoft.public.access.queries)
  • Re: Query is too complex after install Access 2007 SP 2 !?
    ... To be honest, the recurrent and inconsistant problems (sometimes they work, ... queries using a mix of UNION, Sub-Query and Outer Join is one of the main ... reasons that I stopped using JET for most of my work a few years ago. ... query problem would not be affected by decompiling. ...
    (microsoft.public.access.queries)
  • Re: ORDER BY in VIEW not working
    ... That does not invalidate the usefulness of the ... If you allow the creation of queries and views that have these invalid ... clauses then what if the ORDER BY clause on the base view ... clause EVERY TIME a query is created or executed and to disallow the ...
    (comp.databases.ms-sqlserver)
  • Re: probably not as complex as Im thinking...
    ... No, sorry, I get a syntax error in Group By clause here, and I tried not ... >> OK, I have 4 queries, the SQL view of which I have below, with brief ... Please understand that I use the Query Design Grid to make ...
    (microsoft.public.access.queries)