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
memoryif 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" <tgl@sss.pgh.pa.us> wrote:
Suya Huang <shuang@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
memoryas 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