Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLServerBulkCopy consider caching table metadata #1557

Open
robertonr opened this issue Mar 31, 2021 · 3 comments
Open

SQLServerBulkCopy consider caching table metadata #1557

robertonr opened this issue Mar 31, 2021 · 3 comments
Labels
Backlog The topic in question has been recognized and added to development backlog Enhancement An enhancement to the driver. Lower priority than bugs.

Comments

@robertonr
Copy link
Contributor

robertonr commented Mar 31, 2021

I'm using driver version 9.2.1 and I see the following code when SQLServerBulkCopy is enabled in class SQLServerPreparedStatement line 1986:

try (SQLServerStatement stmt = (SQLServerStatement) connection.createStatement( ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, connection.getHoldability(), stmtColumnEncriptionSetting); SQLServerResultSet rs = stmt .executeQueryInternal("sp_executesql N'SET FMTONLY ON SELECT * FROM " + Util.escapeSingleQuotes(tableName) + " '")) {

That executeQueryInternal mades a round-trip to database but its result should be cached for better performance.

@robertonr robertonr added the Enhancement An enhancement to the driver. Lower priority than bugs. label Mar 31, 2021
@peterbae
Copy link
Contributor

Thanks @robertonr, I think this is a valid suggestion and the team will let you know once we have an update.

@ruchirchoudhry
Copy link

@robertonr
Yes caching is a good strategy, but a lot needs to be done to make sure the data in the cache is exactly mirroring the data in the meta tables.
Also every update to the Tx tables or to the tuple , needs to evict of invalidate the data in the caches.
In Tx sync and lock needs to be planned to make this seamless to all the clients.

@Jeffery-Wasty Jeffery-Wasty added the Backlog The topic in question has been recognized and added to development backlog label Mar 10, 2022
@Jeffery-Wasty Jeffery-Wasty reopened this Jul 10, 2024
@Jeffery-Wasty
Copy link
Contributor

Mistakenly closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog The topic in question has been recognized and added to development backlog Enhancement An enhancement to the driver. Lower priority than bugs.
Projects
Status: Backlog
Development

No branches or pull requests

4 participants