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
Sqlserver driver: add an flag option to disable cursor client buffer #16848
Comments
This was added to improve performance on typical result sets. Are you saying you prefer to disable it for all queries? https://book.cakephp.org/4/en/appendices/4-2-migration-guide.html#id3 |
Yes ! Even small result sets are faster (at least) in my environment disabling client buffer ! And, in my very humble opinion, would be a nice option to advanced users who prefers to disable this EDIT: |
Well, if this does not have the desired effect, then we should consider reverting it. Unfortunately, we've had no other feedback on this. |
Please no 😞 I do not think reverting is the best way, just a flag for people like me that uses lots of varbinary and had problems with client cursors. |
Well, we'd like to understand why you have such poor performance with small result sets. |
I made others tests here and problem is beyond that: If I try: function myTest() {
$table = TableRegistry::getTableLocator()->get('TableWithVarBinary');
$conteudo = file_get_contents('arquivo.pdf'); //more than 50MB pdf
$entity = [
'name' => 'Very big file',
'binario' => $conteudo, //my varbinary
'mimetype' => 'application/pdf',
];
$entity = $table->newEntity($entity);
$table->save($entity);
} I got this error (using the original Driver):
Is there a way to disable Buffer on save() ? |
I don't think so. I didn't expect that to be affected either. We should definitely allow this to be disabled. For some reason, I thought it could be disabled with driver config, but we can look into it. |
Azure SQL Server without this option is useless. Very slow. Poor performance. |
This issue is stale because it has been open for 120 days with no activity. Remove the |
Description
In some situations, its desired to avoid the use of the SQL Server Driver Client buffer (examples: performance, large result sets, use of varbinary etc.)
Currently, on CakePHP4.*, the are only "two" ways:
PDO::SQLSRV_ATTR_CURSOR_SCROLL_TYPE => PDO::SQLSRV_CURSOR_BUFFERED
I would like to propose a simple modification of on Sqlserver driver:
and of course a default setting for CURSOR on connect() method, something like that:
I hope the devs consider this because currently I have had to create a custom driver to run my real application with sql server
CakePHP Version
4.*
The text was updated successfully, but these errors were encountered: