Comments (5)
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.
from mysql.
FYI, without a pool ($db = yield \Amp\Mysql\connect(\Amp\Mysql\ConnectionConfig::fromString(...));
) it is a little faster, but still very slow. I run is several times and I cannot get under 20s / 1000 iters.
from mysql.
I think this is probably mainly caused by PDO using the old mysql_native_password
, while amphp/mysql
supports the newer caching_sha2_password
pluggable authentication. caching_sha2_password
however, comes with quite some cost, because the client needs to fetch the server's public key and computed openssl_public_encrypt
(which takes about 13% in my benchmark).
from mysql.
@mvorisek Turns out there was a bug in the caching_sha2_password
implementation, which made it always to a full authentication roundtrip instead of using the fast auth flow.
I'm at 3s for 1000 iterations now instead of 7s with a local mysql docker container.
from mysql.
@kelunik nice finding, thank you
from mysql.
Related Issues (20)
- Stacktrace and debugging HOT 6
- Unsupported protocol version 255 (Expected: 10) instead of properly parsing a "Too many connections" error
- Randomly "Connection closed unexpectedly" Exception HOT 4
- Request: Connection Example for TLS HOT 4
- Implement Support for Protocol::AuthSwitchRequest
- Can we use Named parameters in SQL queries with amphp\mysql package? HOT 1
- Can we have lastInsertId returned in a different method when UUID is used as Primary Key? HOT 4
- Connection closed unexpectedly HOT 4
- Values not saved when named parameters are used in SQL insert queries with amphp\mysql package HOT 3
- about wrapping CommandResult HOT 1
- multi query with prepared statement HOT 5
- Different query result under transaction
- v3 not work HOT 3
- Prepared Statements don't work with DATETIME columns HOT 2
- Reaching connection limit results in protocol version exception HOT 1
- Incorrect handling of fractional seconds in Datetime, and Timestamp columns HOT 3
- Connection closed unexpectedly HOT 2
- Cannot install HOT 5
- Connection pool pop() or push() should modify to release idle connection. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql.