Re: what's the slowest part in the SQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Suya Huang <shuang(at)connexity(dot)com>
Cc: Claudio Freire <klaussfreire(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: what's the slowest part in the SQL
Date: 2016-08-10 00:45:23
Message-ID: 12338.1470789923@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Suya Huang <shuang(at)connexity(dot)com> writes:
> -> Index Scan using idx_order_1_us on order o (cost=0.56..8.58 rows=1 width=30) (actual time=5.814..5.814 rows=0 loops=526)

4 or so ms per row fetched is well within expectation for random access to
spinning-rust media. For example, a 15K RPM drive spins at 4 ms per
revolution, so rotational delay alone would probably explain this number,
never mind needing to do any seeks. So I see nothing even slightly
unexpected here, assuming that the "order" table is large enough that none
of what you need is in RAM already. If you need more performance, look
into SSDs.

(If you have storage kit for which you'd expect better performance than
this, you should start by explaining what it is.)

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2016-08-10 00:46:42 Re: what's the slowest part in the SQL
Previous Message Suya Huang 2016-08-10 00:34:38 Re: what's the slowest part in the SQL