1

How mysql doesn't go out of memory when executes SELECTs that return large amount of data? Could you a link to any related docs?

Roman Roman
  • 807
  • 9
  • 26

1 Answers1

0

(Since there are several possible answers, I won't provide any links at the moment.)

In the server: When needed, the query evaluation will build a temp table on disk. That limits the query size to the available disk space.

In the client: This depends on the client. Some client APIs provide a choice between collecting the entire result set and collection a few rows at a time. The former is likely to be limited by the available memory in the client. PHP, for example, has a configurable max memory usage.

Rick James
  • 135,179
  • 13
  • 127
  • 222