forked from oracle/python-cx_Oracle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquery_arraysize.py
More file actions
23 lines (17 loc) · 756 Bytes
/
query_arraysize.py
File metadata and controls
23 lines (17 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#------------------------------------------------------------------------------
# query_arraysize.py (Section 3.5)
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Copyright 2017, Oracle and/or its affiliates. All rights reserved.
#------------------------------------------------------------------------------
import cx_Oracle
import time
con = cx_Oracle.connect("pythonhol", "welcome", "localhost/orclpdb")
start = time.time()
cur = con.cursor()
cur.arraysize = 10
cur.execute("select * from bigtab")
res = cur.fetchall()
# print(res) # uncomment to display the query results
elapsed = (time.time() - start)
print(elapsed, "seconds")