What impact does the use of multi-query support in PDO have on memory usage and query execution?

When using multi-query support in PDO, it can have an impact on memory usage as all the queries are executed and stored in memory at once. This can lead to increased memory consumption, especially when dealing with large datasets or complex queries. Additionally, the execution of multiple queries simultaneously can affect query execution time and potentially cause performance issues.

// Enable multi-query support in PDO
$pdo->setAttribute(PDO::MYSQL_ATTR_MULTI_STATEMENTS, true);