I'm using SQL server 2008 R2, and the function OpenSqlFilestream to obtain a file handle to open a file with read only access. I need this to be as开发者_如何学编程 quick as possible. OpenSqlFilestream requires being called within a transaction context, even though I won't be committing any changes to the file. Once I have done with the file I need to get rid of the transaction. What would be quicker, a commit or a rollback and why? Or is there some way to simple discard the transaction? I will not be modifying any rows or the file itself.
Found a discussion here already: Should I commit or rollback a read transaction?
精彩评论