[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: table joins or separate begin-select clause



As with all things in programming, the real answer is, it depends!  To
dispel doubt, try it both ways and put some date-time displays in your
program at various checkpoints. You should have a checkpoint before the
primary begin-select, one inside the begin-select, and one at the end.
If you have do statements with selects in them, put show statements with
the time displayed there too.  Once your program has run, you can look
at the time displays and see where the delay points are.

If you are using SQR 3, you can also see the displays happening on the
communication box and might notice some delays between displays.

You can then evaluate the timings running your program with different
styles of FROMs and WHEREs to see which one performs the best.  And you
might try it at different times of the day, if there is alot of heavy
usage of your system.  Many factors will affect this performance.

There are just too many variables involved to make a blanket statement
about which way is best.

pauldp@SFITVA.CC.FITSUNY.EDU wrote:
>
> Could someone from MITI please comment.  It's been a rule here to put the
> table which you expect to get the least number of records from last.  It
> appears to greatly affect performance when you do that.  If it has
> changed (due to Oracle or an SQR upgrade) I'd like to know.  If it
> hasn't, a lot of people might be able to enhance performance.
>
> On Wed, 25 Sep 1996, John Douglas wrote:
>
> >     I vote for biggest table last in the From clause.
> >
> >     John Douglas
> >
> >     Lockheed Martin
> >
>
> Diane Paul
> Fashion Institute of Technology
> INTERNET ADDRESS PAULDP@SFITVA.CC.FITSUNY.EDU
> 212-760-7854