String or Cursor in Oracle PLSQL

2

Good afternoon,

I have a procedure that executes a select, but I work with a bitmap, where I use conditionals to perform a specific select depending on the bit that is passed as a parameter to the procedure. In this scenario I use a varchar variable to store the select statement to be executed, however it may happen that more than one bit is connected, so I perform a concatenation with the UNION operator to join other selects to one.

My question is this, if using a cursor to save the data instead of using concatenated strings, could it increase the performance of the procedure or bring the results faster than the current logic?

Thank you in advance.

    
asked by anonymous 23.12.2014 / 18:34

1 answer

2

No. The cost of creating a cursor for the bank is much higher than the processing of strings.

    
23.12.2014 / 18:41