Skip to content

node-mysql2 is running slower than node-mysql, config issue? #1186

@kevinder

Description

@kevinder

Hi, I wanted to try mysql2 as a replacement for mysql for performance reasons. When I tried it in a production environment, I am actually seeing that mysql2 is slower, so I wonder if it's a config issue on my end. Are there any settings I should try changing?

Using the profiler, I didn't see anything out of the ordinary. The vast majority of time is spent in handlePacket -> TextRow -> wrap. The only other difference I notice between the two libraries is that mysql2 seems to invoke Readable.push in a very regular frequency time-wise, whereas mysql does it in an irregular pattern. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions