Abstract |
: |
This paper compares the performance of common table expressions and cursors when implemented for complex queries. Cursor enables traversal of records in a database. Cursors can also be called as “Iterators”, as it performs retrieval, addition and removal of database records based on the given condition. It is mainly used for processing individual rows in a database. Common table expression is an alternative for derived tables. It increases the performance and reduces the complexity of the queries. CTE is mainly used for writing recursive queries. |