Re: efficient storing of urls - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: efficient storing of urls
Date
Msg-id 20040301194942.GA17186@svana.org
Whole thread Raw
In response to Re: efficient storing of urls  (Shane Wegner <shane-keyword-pgsql.a1e0d9@cm.nu>)
List 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@svana.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

Attachment

pgsql-general by date:

Previous
From: Shane Wegner
Date:
Subject: Re: efficient storing of urls
Next
From: Greg Stark
Date:
Subject: Re: value too long error