optimize_query module

The module optimize_query contains a function which sends the query to Optimizer to be optimized and returns the optimized query back.

async optimize_query.opt_comm_exec(reader, writer, query, db_name, flag)

This function sends the query to Optimizer to be optimized and returns the optimized query back.

Parameters
  • reader – The stream reader of the connection to Optimizer.

  • writer – The stream writer of the connection to Optimizer.

  • query – The the query to be optimized given as string.

  • db_name – The The currently open database related to the given query.

  • flag – The boolean value that shows if the command should be executed by optimizer (True) or should be optimized (False).

Returns

The optimized query as string.