Comments (6)
Can you elaborate further on what you are hoping to see? Perhaps with an example? Currently, the way you repeat executions is as follows:
// set up statement to execute and perform all binds and defines (one-time)
dpiConn_prepareStmt()
dpiStmt_bindByPos()
dpiStmt_bindByPos()
...
dpiStmt_define()
dpiStmt_define()
...
// execute and fetch (multiple times)
modify bind variable values by manipulating dpiData structures
dpiStmt_execute()
dpiStmt_fetch()
examine defined variable values by reading dpiData structures
...
How you were you thinking this could be improved?
from odpi.
I'm sorry,step6 is repeat 2-5,step2 with different sql.
In occi it provide functions:
virtual Statement* Connection::createStatement(const UString &sql);
virtual void Statement::setSQL(const string &sql);
virtual Status Statement::execute(const string &sql = "");
virtual ResultSet* Statement::executeQuery( const string &sql = "");
virtual unsigned int Statement::executeUpdate( const string &sql = "");
so I can re-use Statement,with one call createStatement.
In ocilib it provide same functions,likes:
OCI_Statement* OCI_StatementCreate(OCI_Connection *con);
int OCI_Prepare( OCI_Statement *stmt, const char *sql);
int OCI_Execute( OCI_Statement *stmt);
int OCI_ExecuteStmt( OCI_Statement *stmt, const char *sql);
from odpi.
Since you closed this I assume you are no longer interested in these changes?
from odpi.
this days,I try to change my wrapper oracle-db-driver from occi to oci or other libs writed by C language,I think it may has good performance and more functions.however,I come up against difficulties,they are above oci,OCI seem don't support coroutine(coroutine can see as user state thread, when dbserver is busy for data-search、commit or other things,dbclient will change stack,and execute other coroutine do something in one thread, dbclient will continue work on dbserver respond(data recv), so it will have a good performance, useing less threads or processes), I use coroutine lib(https://github.com/Tencent/libco), but it behave ok when less than 20 coroutine execute in one thread, but when more than 20 coroutine execute sql, the process will be killed by system.
so if this question not be solved, change occi to other lib is meaningless.
from odpi.
hi anthony-tuininga, do you interested in coroutine?
from odpi.
I am interested in anything that will improve performance! If you want to use coroutines with ODPI-C, you will need to create a session pool (dpiPool) and then for each thread/coroutine you need to acquire a connection from that pool. OCI does not provide (currently anyway!) the ability to execute multiple statements asynchronously using one connection. But if you use a session pool you can get a very reasonable approximation. :-) Perhaps try that and see how it works for you?
from odpi.
Related Issues (20)
- XMLTYPE as "real" XML HOT 3
- Ability to set OCI_ATTR_LOBPREFETCH_SIZE HOT 7
- "ORA-03106: fatal two-task communication protocol error" when CLOB is fetched as strings and then lob locators HOT 3
- core dumps generated in libclntsh when timeouts are configured HOT 10
- Any plan to support Apple's M1 plat? HOT 1
- Is there a reference example dequeue message with message ID dequeue option HOT 9
- When ODPI tries to translate a variable to a temporary LOB, and there is inadequate TEMP tablespace, ODPI segfaults when the cursor is closed HOT 6
- M1 Mac issue ( incompatible architecture) HOT 2
- How to use ODPI-C with Oracle Times Ten? HOT 9
- Column Alias Error HOT 7
- Add an option to convert numbers between double and decimal in the same way as node.js, python3, ruby, rust or so HOT 5
- Oracle Rust driver HOT 2
- Option to get json float as float. It is got as double now. HOT 8
- Bytes after nul in members of dpiXid are zeroed. HOT 2
- Is DPI_TPC_END_SUSPEND an undocumented flag in the OCI manual? HOT 3
- dpiEnqOptions_setVisibility and dpiLob_getType are listed not in round_trips.rst HOT 2
- Get column name for position HOT 2
- `dpiStmt_execute` with `DPI_MODE_EXEC_PARSE_ONLY` will create a table. HOT 4
- Retrieving CLOB from an OUT parameter of an Store Procedure HOT 1
- ERROR: DPI-1047: Cannot locate a 32-bit Oracle Client library HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odpi.