-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Connection open + one select + close takes about 30 ms #118
Comments
Please try opening a single connection instead of creating a new pool and closing it each time. I expect it to be a bit slower, but we should investigate what makes it that much slower. |
FYI, without a pool ( |
I think this is probably mainly caused by PDO using the old |
@mvorisek Turns out there was a bug in the I'm at 3s for 1000 iterations now instead of 7s with a local mysql docker container. |
@kelunik nice finding, thank you ❤️ |
I am debugging a php-src 9151 issue and I decided to use this library to check if the issue is present with pure PHP MySQL impl. too or not.
My code looks like:
But it executes more than 10x slower than similar open connection + one select query + close connection code with native
\PDO
driver.With
amp/mysql
the time per iteration is about 30 ms. But I would expect no more than 5 ms / iter. in average.My question is, why is
amp/mysql
so slow and can I improve the code above somehow?Please note, it is intentional to close and reopen the connection in each iteration for my test usecase.
The text was updated successfully, but these errors were encountered: