Re: Close Cursor - Best Practise

avinash nandakumar <[email protected]>
Newsgroups gmane.comp.python.db.cx-oracle
Organization Oracle Corporation
Message-ID <[email protected]>
Hello Anurag,

The Cursor object can be reused many times for different types of 
queries and DMLs.
Unless you require to concurrently execute multiple SQLs/DMLs you can 
serially use the same cursor for multiple queries.
In fact once you close a cursor object you will have to create a new one.
If you see any inconsistency please post it in the forum.

Best Regards,
Avinash

On 9/3/2014 9:49 PM, Anurag Chourasia wrote:
> I will be executing 4 SQL Queries one after the other.
>
> Each query will return a good number of records (> 50000 Records)
>
> I am planning to use the same cursor variable for all the queries to 
> fetch the records into.
>
> What is the best practise w.r.t closing of the Cursor?
>
> Shall i close the cursor after executing and fetching records for each 
> query?
> Or
> Shall i use the same cursor without closing and fetch the records and 
> close it only once after having executed all 4 queries?
>
> Regards,
> Guddu
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
>
>
> _______________________________________________
> cx-oracle-users mailing list
> cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.