4 ms·
Do clients typically communicate with the server in some AST representation instead of, well, SQL? I'd be surprised if that much parsing/planning happens on the
by tadfisher 3y ago
Do clients typically communicate with the server in some AST representation instead of, well, SQL? I'd be surprised if that much parsing/planning happens on the client.
- MrBuddyCasino 3y agoSince prepared statements are created by the driver, I was assuming this was the case - but I might be completely wrong here.
- _flux 3y agoConverting a SELECT to a PRPEPARE does not really require parsing the complete query—or even it it did, some small concessions for this could be implemented in the line protocol to enable the server to do the prepared statement out of client query. I don't believe *any* SQL client library actually tries to parse e.g. PostgreSQL itself at any point of processing. You can read what the PostgreSQL protocol does here: https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-SIMPLE-QUERY https://www.postgresql.org/docs/current/protocol-flow.html#P...
- layer8 3y agoNo, prepared statements are server-side.