Re: Number of Records



Denis Jobin wrote:
> I have a table with over 600,000 records, and it will be growing in the
> future.
> The table has a Primnary key with a single field in the key.
> I want to display the info on a form.
>
> What would be the best way of getting the number of records?
>
> - a field on the form linked to the table in the DataModel using "Number
> of Records"
> - a Tcursor and use nRecords()
> - a Tcursor, go to the end of the table and use RecNo()
> - a Query and calc count

Believe it or not, 600k records is 'not that many' as long as you have an
effective index. If the computer can use an index to zero-in on a subset
of the records, without having to read and examine the contents of each
one, everything will be (and will remain) very fast indeed.

Use a SetRange to get to the subset of records you want to consider.

Forget about "RecNo."

Don't do a query, because that would cause the computer to consider every
range that exists, and the count of records in every range ... not just the
one range that you are presently interested in.

-----------------------
ChimneySweep(R): Fast(!) table maintenance at a click of the mouse!
http://www.sundialservices.com
.



Relevant Pages

  • Re: multiple tables in one query
    ... subforms would probably be in order. ... > by changing the Recordset to Dynaset(Inconsistent ... If I try to put in the RecNo. ... >>result in a non updateable query. ...
    (microsoft.public.access.queries)
  • Error in New Query Wizard in Server Explorer using OLEDB provider
    ... Whenever I try to create a query involving an outer join and execute SQL with ... Recno integer, Type integer. ... Microsoft OLE DB Provider for Visual FoxPro ...
    (microsoft.public.vsnet.ide)
  • Re: the "having" clause
    ... That other database tool doesn't follow the ANSI SQL standard. ... evaluation order is why you can only refer to a column alias in the ORDER BY ... SELECT ..., recno ... a query that he regularly posts here. ...
    (microsoft.public.sqlserver.programming)
  • Re: select non-dup records
    ... I want to select recno 1 and 4. ... How to construct a query? ... Sort decending by sem and group all other ...
    (microsoft.public.access.queries)
  • Re: Query directly from secondary index
    ... Which is ofcourse very different from a 650kb with 50 k index file. ... A query draws the entire table local, ... even the columns that is not refered to by the tcursor? ...
    (comp.databases.paradox)