[YSQL] [PERF] Optimize the execution pipeline when expression evaluation is not needed in Postgres layer #2173
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
Projects
Jira Link: DB-4837
#2178 is prerequisite for this work.
Currently our pipeline serializes and deserializes data twice before sending it to users / clients.
1- Load column data from disk.
2- Evaluate YugaByte-supported expressions of columns.
3- Serialize the result from step 2 and send the buffer to proxy server.
4- Deserialize the buffer from step 3 back into individual values (Postgres::Datum).
5- Evaluate expressions of datums using Postgres code.
6- Serialize the result from step 5 back into a buffer.
7- Send the buffer from step 6 to client side.
For the scenarios where YugaByte can evaluate all expressions, we should not need steps 4, 5, and 6. In these cases, DocDB should serialize data in a proper format, and the content of the resulted buffer should be sent to client without any extra processing.
The text was updated successfully, but these errors were encountered: