Not really, the server has 2 GB memory (PROD is a lot more than this dev box), so the table should be able to fit in memory if we preload them.
MemTotal: 2049572 kB dev=# select pg_size_pretty(pg_relation_size('data')); pg_size_pretty ---------------- 141 MB (1 row) Time: 2.640 ms dev=# select pg_size_pretty(pg_relation_size('order')); pg_size_pretty ---------------- 516 MB (1 row) Thanks, Suya On 8/10/16, 11:57 AM, "Tom Lane" <t...@sss.pgh.pa.us> wrote: Suya Huang <shu...@connexity.com> writes: > Thank you Tom very much, that’s the piece of information I miss. > So, should I expect that the nested loop join would be much faster if I cache > both tables (use pg_prewarm) into memory as it waives the disk read? pg_prewarm is not going to magically fix things if your table is bigger than RAM, which it apparently is. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance