In my application, there is one query that I need to execute unbuffered, because it returns too many results to fit in memory. I would like to execute this one query unbuffered, while leaving the rest of the queries as buffered. I’m using laminas-db with PDO to MySQL.
There doesn’t seem to be a way to run
on the PDO resource after the database connection is established, and I don’t want to configure the entire connection as unbuffered. Ideally, I would like to avoid using two database connections as well.