03-07-2007 10:33 AM
Hello All,
When ever I run SE30 for a program, in the hit list I see "OPEN CURSOR XXXTable". What does open cursor mean? Why does that occur? I see that this is utilizing most of the time Is there some fix to it, if it is truly fixable?
Thanks ahead
SDN FAN
03-07-2007 11:21 AM
Hi!
A select is split in four parts on a DB:
- prepare: statement preparation, translation of open to native SQL
- open: the data searching by the database
- fetch: data transport to application server, maybe also sort on DB level
- close: 'cleaning up'
Instead of prepare also a reopen can occur, then identical selects are used from cache instead of new translation.
Regards,
Christian
03-13-2007 3:36 AM
The performance issue is with the INDEX of the table. Whenever a table is used in the program for selecting data, based on the where clause the system triggers the appropriate INDEX for the selection that is an exact match for the Index. I
f the where clause contains fields other than the fields in the index (all or some of the index fields), locating the appropriate index takes time. This is why the time consumption is more. To overcome this use "%_HINTS" extension with the SELECT statement to define the INDEX of selection.
Naveen.