pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Harris <fbsd@drivefaster.net>
To: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Performance problem with table containing a lot of text (blog)
Date: Tue, 28 Aug 2007 13:04:31 -0600
Message-ID: <46D471BF.5040803@drivefaster.net> (raw)
In-Reply-To: <Pine.HPX.4.62.0708282016250.3324@purple.bdb.fi>
References: <Pine.HPX.4.62.0708282016250.3324@purple.bdb.fi>

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.





view thread (6+ messages)  latest in thread

Message-ID: <46D471BF.5040803@drivefaster.net>
Permalink:  ../46D471BF.5040803@drivefaster.net/
Also on:    postgresql.org/message-id/46D471BF.5040803@drivefaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: fbsd@drivefaster.net
  Subject: Re: Performance problem with table containing a lot of text (blog)
  In-Reply-To: <46D471BF.5040803@drivefaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox