What happens when an SQL query ends in memory?

I want to configure a Postgres server on AWS, the largest table will be 10 GB - do I need to select 10 GB of memory for this instance?

What happens when the result of my request is more than 10 GB?

+6
source share
2 answers

Nothing will happen, the entire result set will not be loaded into memory. The maximum available memory will be used and reused as needed, until the result is prepared, and if necessary it will go to disk.

See the PostgreSQL resource documentation for more details .

In particular, see work_mem:

work_mem ( ) , - .

, , .

: What happens when you query a 10GB table without 10GB of memory on the server/instance?

:

  • .
  • , JDBC , , .

, .

+4

, , , "", , , . , - "" , , , , . JDBC postgres " " , ( , ).

(, 100M , "X", X ) , , , ( ), , , . , , , .

+2

All Articles