Skip site navigation (1) Skip section navigation (2)

Re: Performance problem with table containing a lot of text (blog)

From: Dan Harris <fbsd(at)drivefaster(dot)net>
To: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance problem with table containing a lot of text (blog)
Date: 2007-08-28 19:04:31
Message-ID: 46D471BF.5040803@drivefaster.net (view raw or flat)
Thread:
Lists: pgsql-performance
Kari Lavikka wrote:
> Hello!
> 
> Some background info.. We have a blog table that contains about eight 
> million blog entries. Average length of an entry is 1200 letters. 
> Because each 8k page can accommodate only a few entries, every query 
> that involves several entries causes several random seeks to disk.  We 
> are having problems with queries like:
> 
> 1) give me a list of months when I have written someting
> 2) give me id's of entries I have written on month X year X
> 3) give me the number of blog entries my friends have written since last
>    time

I didn't see your schema, but couldn't these problems be solved by storing the 
article id, owner id, and blog date in a separate table?  It seems that if you 
don't actually need the content of the blogs, all of those questions could be 
answered by querying a very simple table with minimal I/O overhead.



In response to

Responses

pgsql-performance by date

Next:From: Kari LavikkaDate: 2007-08-28 19:10:33
Subject: Re: Performance problem with table containing a lot of text (blog)
Previous:From: Kari LavikkaDate: 2007-08-28 18:53:37
Subject: Performance problem with table containing a lot of text (blog)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group