Re: performance question

Поиск
Список
Период
Сортировка
Искать
От
Manfred Koizar
Тема
Re: performance question
Дата
Msg-id
1k3o2v01b5ceh937kibrojn2fjks3fc93t@4ax.com
Ответ на
performance question (Moritz Lennert)
Список
Дерево обсуждения
performance question "Moritz Lennert" <mlennert@club.worldonline.be>
Re: performance question Manfred Koizar <mkoi-pg@aon.at>
Re: performance question Tom Lane <tgl@sss.pgh.pa.us>
Re: performance question Vernon Wu <vernonw@gatewaytech.com>
Re: performance question Tomasz Myrta <jasiek@klaster.net>
Re: performance question "Josh Berkus" <josh@agliodbs.com>
Re: performance question "Moritz Lennert" <mlennert@club.worldonline.be>
Re: performance question "Josh Berkus" <josh@agliodbs.com>
Re: performance question "Moritz Lennert" <mlennert@club.worldonline.be>
On Mon, 20 Jan 2003 12:40:34 +0100 (CET), "Moritz Lennert"
 wrote:
>I have a table with some 2.2 million rows on a Pentium4, 1.8GHz with 512
>MB RAM.
>Some queries I launch take quite a long time, and I'm wondering whether
>this is normal,or whether I can get better performance somehow.

Moritz, we need more information.  Please show us. your PG version. CREATE TABLE .... indices. your query. EXPLAIN ANALYZE output. your settings, especially shared_buffers, sort_mem,
random_page_cost, effective_cache_size

>One question I asked myself is whether the use of char(2) is the best
>option. The column (and most others in the table) contains codes that
>designate different characteristics (for ex. in a column 'sex' one would
>find '1'=male, '2'=female).

char(2) needs 8 bytes, smallint only 2 bytes (unless followed by a
column with 4 or 8 byte alignment).  Instead of char(1) (8 bytes) you
might want to use the Postgres specific type "char" (with the double
quotes!) needing only 1 byte.

ServusManfred

В списке pgsql-sql по дате отправления
От: Jimmy Mäkelä
Дата:
Сообщение: Re: Unique indexes not unique?
От: Moritz Lennert
Дата:
Сообщение: Re: performance question
FAQ