pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Bax <fbax@sympatico.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Functional Indexes
Date: Tue, 15 Jul 2003 14:06:06 -0400
Message-ID: <5.2.1.1.0.20030715140305.037ed940@pop6.sympatico.ca> (raw)
In-Reply-To: <E7E213858379814A9AE48CA6754F5ECB0D6FC9@mail01.stbernard.co m>

The two functions do not group data the same way, so a common index is not 
possible.
urlhost would put pgsql.org and pgsql.com close together.
urltld would but pgsql.com and xyz.com close together.

Frank


At 01:36 PM 7/15/03, David Olbersen wrote:

>Hello all,
>
>I have a function (urlhost) which finds the 'host' portion of a URL. In 
>the case of http://www.foobar.com/really/long/path/to/a/file it returns 
>"www.foobar.com".
>
>I also have a function (urltld) which returns the TLD of a URL. In the 
>case of http://www.foobar.com/really/long/path/to/a/file it returns ".com" 
>(the leading dot is OK).
>
>urltld uses urlhost to do it's job (how should be apparent).
>
>Now the question: is there a single index I can create that will be used 
>when my  WHERE clause contains either urlhost or urltld? I could create 
>two functional indexes, but that seems a bit silly to me.
>
>Any thoughts?
>
>--------------------------
>David Olbersen
>iGuard Engineer
>St. Bernard Software
>11415 West Bernardo Court
>San Diego, CA 92127
>1-858-676-2277 x2152
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




view thread (13+ messages)  latest in thread

Message-ID: <5.2.1.1.0.20030715140305.037ed940@pop6.sympatico.ca>
Permalink:  ../5.2.1.1.0.20030715140305.037ed940@pop6.sympatico.ca/
Also on:    postgresql.org/message-id/5.2.1.1.0.20030715140305.037ed940@pop6.sympatico.ca

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: fbax@sympatico.ca
  Subject: Re: Functional Indexes
  In-Reply-To: <5.2.1.1.0.20030715140305.037ed940@pop6.sympatico.ca>
  References: <5.2.1.1.0.20030715140305.037ed940@pop6.sympatico.ca>

* 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