Re: Slow query with big tables

Поиск
Список
Период
Сортировка
От Craig James
Тема Re: Slow query with big tables
Дата
Msg-id CAFwQ8rcGGeVk0Gayz1QEP+VMp8AQi8O-f=OtbtR5T2OXVp8iiQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Slow query with big tables  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Slow query with big tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Slow query with big tables  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-performance
On Fri, Aug 26, 2016 at 9:11 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
On 8/26/16 3:26 PM, Mike Sofen wrote:
Is there way to keep query time constant as the database size grows.

No. More data == more time. Unless you find a way to break the laws of physics.

Straight hash-table indexes (which Postgres doesn't use) have O(1) access time. The amount of data has no effect on the access time. Postgres uses B-trees which have O(logN) performance. There is no "law of physics" that says Postgres couldn't employ pure hash indexes.

Craig


Should I use partitioning or partial indexes?

Neither technique is a magic bullet. I doubt either would help here.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



--
---------------------------------
Craig A. James
Chief Technology Officer
eMolecules, Inc.
---------------------------------

В списке pgsql-performance по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Slow query with big tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Slow query with big tables