Results 1 to 2 of 2

Thread: set rowcount 1

  1. #1
    Join Date
    Nov 2002
    Posts
    94

    Unanswered: set rowcount 1

    Is there any performance issue using set rowcount 1 over while loop.

    what Sybase does internally when we set rowcount 1?

    pl reply.,
    Ram

  2. #2
    Join Date
    Dec 2003
    Posts
    44

    Re: set rowcount 1

    There shouldn't be any performance issues with using a ROWCOUNT of 1.

    If your WHILE loop is issuing an UPDATE for example and you've set the rowcount to 1, only the first row meeting the criteria in a WHERE clause is updated.

    The only time I've run into a bit of a surprise is when I ran a SELECT with a GROUP BY and my rowcount was set to 100. In this case the query runs, it creates a temp summary table with my specified grouping, then returns the first 100 rows from it.

    The source table was 80 million rows big so it took a quite some time to create my grouping.

    Hope that helps,

    Isaac



    Originally posted by ramshree
    Is there any performance issue using set rowcount 1 over while loop.

    what Sybase does internally when we set rowcount 1?

    pl reply.,
    Ram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •