Re: efficient storing of urls

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Shane Wegner <shane-keyword-pgsql(dot)a1e0d9(at)cm(dot)nu>
Cc: pgsql-general(at)postgresql(dot)org, "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Subject: Re: efficient storing of urls
Date: 2004-03-01 19:49:43
Message-ID: 20040301194942.GA17186@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 01, 2004 at 11:23:45AM -0800, Shane Wegner wrote:
> Hmm, I don't think it's using the index. I tried two indexes
> create index hit_date on hits(hit_date);
> create index hit_date2 on hits(hit_date,url_id);
> vacuum analyze;
>
> With the hope that it would use the multicolumn index for
> hit_date and url_id but it's still doing a seq scan on
> hits.

Try an index on (url_id,hit_date), there's a difference.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> If the Catholic church can survive the printing press, science fiction
> will certainly weather the advent of bookwarez.
> http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2004-03-01 20:07:59 Re: value too long error
Previous Message Shane Wegner 2004-03-01 19:23:45 Re: efficient storing of urls