Re: Indexing Question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Anders Altberg (x_pragma_at_telia.com)
Date: 10/04/04

  • Next message: Kevin Yu [MSFT]: "Re: RecordChangeComplete and Primary Key constraint"
    Date: Mon, 4 Oct 2004 20:45:32 +0200
    
    

    You need an index on jobdate. A logical field like Complete is not likely to
    be discriminatory enough to make any positive contribution. The more you can
    restrict the query the better. Perhaps jobdate BETWEEN {" & pDate1 & "} AND
    {" & pDate2 & "} would help.
    -Anders

    "Darwin Weyh" <shtdev.delete.this@weyh.net> wrote in message
    news:#E$1ybhqEHA.1712@tk2msftngp13.phx.gbl...
    > I have a VB6 application in which I access a FP6 DB with ADO.
    >
    > As one of the tables gets bigger ( 20,000 Records) My response is
    degrading.
    >
    > A typical Recordset open is as follows
    >
    > SQLstr = "select * from orders where jobdate < {" & pDate & "} and
    complete
    > = .T."
    > RS.open sqlstr,db, adOpenStatic, adLockReadOnly
    >
    > What kind of index should I set up to speed this open up?
    >
    > Can someone point me to a good explanation of Indexes and how they relate
    to
    > the SQL 'select' commands.
    >
    >
    > Thanks,
    >
    > --
    > Darwin C. Weyh
    > shtdev.delete.this@weyh.net
    > And for the spammers: dweyh@weyh.net
    >
    >


  • Next message: Kevin Yu [MSFT]: "Re: RecordChangeComplete and Primary Key constraint"

    Relevant Pages

    • Re: Indexing Question
      ... You need an index on jobdate. ... A logical field like Complete is not likely to ... be discriminatory enough to make any positive contribution. ...
      (microsoft.public.vb.database)
    • Re: Indexing Question
      ... You need an index on jobdate. ... A logical field like Complete is not likely to ... be discriminatory enough to make any positive contribution. ...
      (microsoft.public.fox.vfp.queries-sql)