Hi Mike

> Message: 1
> Date: Tue, 25 Mar 2008 15:52:39 -0400 (EDT)
> From: "MB Software Solutions General Account"
>        <[EMAIL PROTECTED]>
> Subject: Performance hits when using SET ORDER TO x on LAN tables?
> To: [EMAIL PROTECTED]
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="us-ascii"
>
> (VFP9SP1)
>
> This legacy code has several instances like this:
>
>  SELECT MyTableOnLAN
>  SET ORDER TO MyOrder
>  SEEK MyValue
>  IF FOUND() ...
>
>
> I can't recall where, but I thought I had heard long ago that there was a
> performance penalty of sorts for doing a SET ORDER TO <index> like that.
> It'd be easy to replace these with IF
> SEEK(MyValue,"MyTableOnLAN","MyOrder") logic, but of course I don't want
> to make changes on stuff that may not be broken or things that may not
> contribute to bugs.
>
> Does anyone recall if there was a performance penalty for doing a SET
> ORDER TO call, explicitly setting the index on a LAN table?

No. There is no such performance penalty. There may be a slight
benefit to using 1 line of code versus 4, but that's about it. If you
tried to use a Rushmore aware command like SET FILTER or LOCATE, they
would run slower if an order is set.

The advice you got about SQL commands is incorrect. VFP SQL re-opens
the cursors in their own workareas so it can avoid any ORDER/SET
FILTER you've already put on the cursors.

Mike Yearwood


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to