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,
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?