× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Nathan,

Better be careful..... You're not using any of the fields in the read record
format, so I *THINK* the compiler speeds up the program by not processing
unused fields.  Since you don't use any of them in your program, there's no
overhead related to moving the data into storage.  If you were actually
using some of those fields, I think you'd see more overhead than you saw on
this test.  (Sorry I can't test it right now....)

Eric DeLong
Sally Beauty Company
MIS-Sr. Programmer/Analyst
940-898-7863 or ext. 1863



-----Original Message-----
From: Nathan M. Andelin [mailto:nandelin@relational-data.com]
Sent: Tuesday, March 12, 2002 9:57 AM
To: midrange-l@midrange.com
Subject: Re: SQL Existence Check


> From: <David.X.Kahn@gsk.com>
> Nathan wrote:
>
> >> Why not use a CHAIN?
> >
> > You took the first thought that came to my mind and put it into
> > words <smile>.  Or, why not use SETLL for better performance?
>
> Because it's a fallacy. :-)
>
> Dave...

I wrote the following program to test CHAIN vs. SETLL.  It did surprise me
that CHAIN took only 13% more time.  That's not much difference.  Thank you
for pointing out the not-so-obvious.

     Ftestio    IF   E           K DISK

     D myKey           S             12A   Dim(10000)
     D i               S             10I 0
     D Now             S               Z
     D Then            S               Z
     D Secs            S             10I 0

      *-----------------------------------------------------------------

     C                   For       i = 1 to 10000
     C                   Read      testior
     C                   Eval      myKey(i) = tikey
     C                   EndFor

      *-----------------------------------------------------------------

     C                   Time                    Then
     C                   For       i = 1 to 10000
     C     myKey(i)      Setll     testio                                 70
     C                   EndFor

      *-----------------------------------------------------------------

     C                   Time                    Now
     C     Now           Subdur    Then          Secs:*MS
     C     Secs          Dsply

      *-----------------------------------------------------------------

     C                   Time                    Then
     C                   For       i = 1 to 10000
     C     myKey(i)      Chain     testior                            70
     C                   EndFor

      *-----------------------------------------------------------------

     C                   Time                    Now
     C     Now           Subdur    Then          Secs:*MS
     C     Secs          Dsply

      *-----------------------------------------------------------------

     C                   SetOn                                        LR
     C                   Return

Nathan M. Andelin
www.relational-data.com


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.