Re: Performance vs Schemas

Поиск
Список
Период
Сортировка
От Gregory S. Williamson
Тема Re: Performance vs Schemas
Дата
Msg-id 71E37EF6B7DCC1499CEA0316A256832801D4B992@loki.wc.globexplorer.net
обсуждение исходный текст
Ответ на Performance vs Schemas  ("Igor Maciel Macaubas" <igor@providerst.com.br>)
Список pgsql-performance
Igor,

I'm not sure if it is proper to state that schemas are themselves speeding things up.

As an example, we have data that is usually accessed by county; when we put all of the data into one big table and
selectfrom it using a code for a county of interest, the process is fairly slow as there are several hundred thousand
candidaterows from that county in a table with many millions of rows. When we broke out certain aspects of the data
intoschemas (one per county) the searches become very fast indeed because we can skip the searching for a specific
countycode with the relevant tables and there is less (unneeded) data in the table being searched.   

As always, "EXPLAIN ANALYZE ..." is your friend in understanding what the planner is doing with a given query.

See <http://www.varlena.com/varlena/GeneralBits/Tidbits/> for some useful information, especially under the performance
tipssection. 

HTH,

Greg Williamson
DBA
GlobeXplorer LLC

-----Original Message-----
From:    Igor Maciel Macaubas [mailto:igor@providerst.com.br]
Sent:    Thu 10/14/2004 11:38 AM
To:    pgsql-performance@postgresql.org
Cc:
Subject:    [PERFORM] Performance vs Schemas
Hi all,

I recently migrated my database from schema 'public' to multiple schema.
I have around 100 tables, and divided them in 14 different schemas, and then adapted my application to use schemas as
well.
I could percept that the query / insert / update times get pretty much faster then when I was using the old unique
schema,and I'd just like to confirm with you if using schemas speed up the things. Is that true ? 

What else I can do to speed up the query processing, best pratices, recommendations ... ? What about indexed views,
doespostgresql supports it? 

Regards,
Igor
--
igor@providerst.com.br




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

Предыдущее
От: "Igor Maciel Macaubas"
Дата:
Сообщение: Performance vs Schemas
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Excessive context switching on SMP Xeons