![cursors plsql cursors plsql](https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https:%2F%2Fblog.kakaocdn.net%2Fdn%2FbUk2KU%2FbtrbAHXLe2h%2FermKbLNhBxm59svkWc6Wm1%2Fimg.png)
The performance impact of using FETCH is also evident in a comparison with a cursor FOR loop, as shown in the example below.Notice how using the explicit and implicit cursor FOR loops give comparable performance.
![cursors plsql cursors plsql](https://cdn.cupdf.com/img/375x275/reader016/image/20181223/547cb4c2b4af9fbb378b46a0.png)
![cursors plsql cursors plsql](https://www.codevelop.art/images/posts/x_UPr2KV6.jpg)
This makes the performance difference between the explicit and implicit cursor even more extreme.
Cursors plsql code#
If we manually code the FETCH to do logically the same amount of work, the comparison would look like that listed below. The implicit cursor is not only faster, but it is actually doing more work, since it includes a NO_DATA_FOUND and a TOO_MANY_ROWS exception check. This clearly demonstrates the implicit cursor is measurably faster than the explicit cursor. (DBMS_UTILITY.get_time - l_start) || ' hsecs') Remember that a real system will be running many individual queries, so although each may appear to be quick on it's own, any unnecessary performance overhead, like FETCH, will affect whole system performance. Since both these actions are really quick of an individual statement, we will repeat them in a loop to magnify the impact of the difference. INTO, an implicit cursor, and FETCH, an explicit cursor. The point of this example is to compare the performance of a single SELECT. The test use the DBMS_UTILITY.GET_TIME function to get the current time before and after the test, with the delta value representing the elapsed time in hundredths of a second. This article compares the performance of implicit and explicit cursors. Home » Articles » Misc » Here Implicit vs.