Cursor capacity

  • hi all,

    I made one cursor for insert some record set to loop my view.

    But in my problem i want to know howmany records are insert to my cursor.Before loop i want to identitify its capacity.

    Is there any method to identify cursor capacity.

    Let me know please.

    (Urgent)

    Thankyou all

    Sampath

  • Maybe it would be better not to use cursor at all... in most cases, it is possible to find a set-based solution which performs much better than cursor. Could you describe what you are trying to achieve? Hopefully we will be able to help you find a better solution.

  • There is no "cursor capacity". It will use available resources to read everything up to the full size of the table. You could cause memory issues, but that is a resource issue, not a cursor limitation.

  • Steve,

    I think this is language issue... what the poster (probably) wants to know is not theoretical capacity of a cursor, but how many rows currently are in the cursor that was just declared. However, I might be wrong :hehe: the question can be understood in both ways.

  • Sampath - to echo what Vladan is saying - cursor's are slow compared to other solutions. If the cursor is so big that you need to know how many records it is going to hold, then you're using the wrong method.

    That being said though, if you were to run a count on the same query that would create your cursor, you'd have a representative count as to how big your cursor is going to be.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply