Reputation: 148
I am currently working on the performance of a database (frontend) in C++ with the MySqlConnector-library.
The library has own datatypes/classes like the sql::ResultSet
.
After you send a SELECT
-statement to the database you receive a sql::ResultSet*
(pointer) which I put into a sharedpointer: typedef boost::shared_ptr<sql::ResultSet> ResultPtr
I use this pointer multiple times in different modules. All need the result of this operation. You can call operations like myResultPtr->getMetaData()->getColumnName(columnindex)
My question: Are operations like above buffered or does the MySqlConnector-library always ask the database (via connection) for metadata? Should i build a buffer for this or is the ResultSet (especially the metadata) buffered?
Upvotes: 0
Views: 157
Reputation: 148
In the docs I found a line, that all data is buffered. I measured the time on huge Datasets and found out, that the MetaData have to be buffered, too.
You don't need to build a buffer for the MySqlConnector-library.
Upvotes: 1