Re: PostgreSQL limitations question

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: PostgreSQL limitations question
Дата
Msg-id 4FFE2359.1020901@ringerc.id.au
обсуждение исходный текст
Ответ на PostgreSQL limitations question  (Bartosz Dmytrak <bdmytrak@gmail.com>)
Ответы Re: PostgreSQL limitations question  (Bartosz Dmytrak <bdmytrak@gmail.com>)
Список pgsql-general
On 07/12/2012 05:01 AM, Bartosz Dmytrak wrote:
> 1. Create Table:
> CREATE TABLE test.limits("RowValue" text) WITH (OIDS=FALSE,
> FILLFACTOR=100);
>
> 2. Fill table (I used pgScript available in pgAdmin);
I suspect that's a pretty slow way to try to fill your DB up. You're
doing individual INSERTs and possibly in individual transactions
(unsure, I don't use PgAdmin); it's not going to be fast.

Try COPYing rows in using psql. I'd do it in batches via  shell script
loop myself. Alternately, you could use the COPY support of the DB
drivers in perl or Python to do it.


> 3. do Vacuum full to be sure free space is removed
> VACUUM FULL test.limits;
Which version of Pg are you running? If it's older than 9.0 you're
possibly better off using "CLUSTER" instead of "VACUUM FULL".

> 4. I checked table size:
> SELECT * FROM pg_size_pretty(pg_relation_size('test.limits'::regclass));
> and I realized table size is 32 kB.

Use pg_total_relation_size to include TOAST tables too.

--
Craig Ringer

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

Предыдущее
От: Toby Corkindale
Дата:
Сообщение: Re: Bug? Prepared queries continue to use search_path from their preparation time
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Timeline error on streaming replica (WAS: "Please post")