[MDEV-16670] Improve execute direct (prepare and execute) performance Created: 2018-07-03  Updated: 2023-12-21

Status: Open
Project: MariaDB Server
Component/s: Prepared Statements
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Oleksandr Byelkin Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 3
Labels: energy

Issue Links:
Blocks
blocks CONPY-16 benchmark current implementation vers... Open
is blocked by MDEV-22324 Benchmark parts of query-processing Open
Relates
relates to ODBC-286 Very Poor Performance on Remote Conne... Open

 Description   

Sequence of prepare and then executing require a lot of double work it looks like this:
Prepare:
1.1 Parse
1.2 open and lock tables
1.3 prepare
1.4 close tables
1.5 cleanup
Execute:
2.1 open and lock tables
2.2 prepare
2.3 optimize
2.4 execute
2.5 close tables
2.6 cleanup

It is clear, that if we would know that it is direct execute call we can avoid double work on the server side



 Comments   
Comment by Diego Dupin [ 2018-07-13 ]

From the connector point of view, a COM_STMT_PREPARE *will be followed by a *COM_STMT_EXECUTE.

So the best would seem to me that there must be a command COM_STMT_PREPARE_EXECUTE
That would not only permit server optimization but permit to skip one network exchange + one useless metadata exchanges.

Comment by Vladislav Vaintroub [ 2020-07-16 ]

sanja, you know it is direct execute call , if it is "EXECUTE IMMEDIATE" for example.

Generated at Thu Feb 08 08:30:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.