Mephisto database optimization

Posted by marco
Tue, 26 Jun 2007 11:59:00 GMT

This blog runs on mephisto. In a standard installation, the database is not optimized. A few indexes (for postgresql, but I think that the could esaily adapted for other database engines) may optimize the performance (YMMV):

1
2
3
4
5
6
7
8
CREATE INDEX cached_pages_url ON cached_pages (site_id, url);
CREATE INDEX contents_type ON contents(site_id, type);
CREATE INDEX tags_name ON tags(name);
CREATE INDEX cached_pages_url2 ON cached_pages (site_id, url,id);
CREATE INDEX contents_pub_at ON contents(published_at);
CREATE INDEX contents_pub_at_type ON contents(published_at, type);
CREATE INDEX contents_perma_type ON contents(site_id,type,permalink, published_at);
CREATE INDEX contents_approv ON contents( article_id,approved, type );
Comments