Skip to content

Enhancement request: Support buffered results #328

@shlomi-noach

Description

@shlomi-noach

At this time, as I select a large number of rows from the database (e.g. 1,000,000) at a single query, and process those rows on application side, what locks are taken by MySQL for the query are kept until the application is done processing.
This is due to the go-mysql driver not buffering result sets.

I suggest that this should be controllable; similarly to the C driver or the Connector/J driver, there should be a mysql_use_result/mysql_store_result config to control buffering. I suggest this is actually an important feature as, unfortunately, MySQL happens to put locks on seemingly innocent queries.

Having a buffered result set would only lock throughout the network time for results delivery; by the time the application gets to handle the result set, any locks will have already been cleared, and the application is free to waste clock time without impacting other database users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions