Re: SELECT * FROM LIMIT 1; is really slow Поиск
Список
Период
Сортировка
От David Blasby
Тема Re: SELECT * FROM LIMIT 1; is really slow
Дата
Msg-id 40B616CE.7090907@refractions.net
обсуждение исходный текст
Ответ на Re: SELECT * FROM LIMIT 1; is really slow  (David Blasby <dblasby@refractions.net>)
Список pgsql-hackers
I did a CLUSTER - it took just under 12 hours.  The original load of the 
table (including parsing all the geometries) took about 4 hours (+4 to 
build the indexes and vacuum analyse).  I dont know why the cluster is 
so much slower...

My "SELECT * FROM <table> LIMIT 1;" is now fast.

Thanks for the help!


As a side note, I think the behavior of the Database is a bit 
counter-intuitive.  If I were to do a:

UPDATE <table> SET i = i + 1;

My table will "leak" 10Gb of disk space, make queries extreamly slow, 
and require taking the database off-line for 12 hours to fix it!

Both the VACUUM and the UPDATE manual should be updated to say that this 
is whats happening.  If I do my above query 100 times, will I be leaking 
a Terrabyte of disk space?

Will increasing my max_fsm_pages to 2,000,000 solve my problem?

dave


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SELECT * FROM LIMIT 1; is really slow
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: tablespaces and DB administration