What you mean to have to use cursor actually means data have to be processed one record by one record.
SQL’s strength is dataset (multi-records) processing. Looping one record by one record and calculation are not its strength.
If you have to process one record by one record, you should think other solution, for example, putting task in a program outside database. Many program’s loop is faster than database cursor loop. And a big database job runs for hours will hang on other data processes. It wastes expensive database resource.
SQL’s strength is dataset (multi-records) processing. Looping one record by one record and calculation are not its strength.
If you have to process one record by one record, you should think other solution, for example, putting task in a program outside database. Many program’s loop is faster than database cursor loop. And a big database job runs for hours will hang on other data processes. It wastes expensive database resource.