Re: what's the slowest part in the SQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <tgl@xxxxxxxxxxxxx> wrote:

Suya Huang <shuang@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux