pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Harald Fuchs <use_reply_to@protecting.net>
To: pgsql-sql@postgresql.org
Subject: Re: Trimming the cost of ORDER BY in a simple query
Date: 03 May 2005 12:59:48 +0200
Message-ID: <puu0lk60d7.fsf@srv.protecting.net> (raw)
References: <20050503043531.23516.qmail@web31106.mail.mud.yahoo.com>
	<1115104938.5853.25.camel@localhost.localdomain>

In article <camel@localhost.localdomain/">1115104938.5853.25.camel@localhost.localdomain>,
Ragnar Hafstaư <gnari@simnet.is> writes:

> 20 ms does not sound like a big problem.

> if 20 ms is really too much for you, and add_date IS a timestamp,
> you might think about adding a date column , maintained
> by triggers of by your application, and add an index on (user_id, x)

Maybe a functional index on "date_trunc('day', add_date)" would be helpful?




view thread (5+ messages)

Message-ID: <puu0lk60d7.fsf@srv.protecting.net>
Permalink:  ../puu0lk60d7.fsf@srv.protecting.net/
Also on:    postgresql.org/message-id/puu0lk60d7.fsf@srv.protecting.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-sql@postgresql.org
  Cc: use_reply_to@protecting.net
  Subject: Re: Trimming the cost of ORDER BY in a simple query
  In-Reply-To: <puu0lk60d7.fsf@srv.protecting.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