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

Re: Nested begin-select blocks



Hi John,
        From what I have been told it depends on the sizes of your tables.
In general, if the tables that you are joining have more than roughly
100,000 rows you will get better performance from using nested selects and
bind variables.  The bigger the tables the better the performance.

Dan

        -----Original Message-----
        From:   John Milardovic [SMTP:milardj@SX.COM]
        Sent:   Thursday, August 05, 1999 2:43 PM
        To:     Multiple recipients of list SQR-USERS
        Subject:        Nested begin-select blocks

        Hi all.

        I'm writing a couple of reports that have nested begin-select blocks
i.e..

                begin-select
                job_numbers
                        !for each job number call procedure to select job
details
                from
                some_table

        The details from each job number will make up individual *.lis
files.

        I was just wondering if this would cause a performance issue and
whether I
        would be better off joining the two select blocks together and
breaking on
        job number to print out the individual details.  In terms of
readability and
        ease of programming I find the nested route easier to develop.

        I would appreciate it if anyone could give me some advice (in
regards to
        performance) based on prior experience.

        Thanks.
        John Milardovic