pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Fankhauser <nickf@ontko.com>
To: wweng@kencast.com
To: pgsql-sql@postgresql.org
Subject: Re: create index on function - why?
Date: Fri, 15 Feb 2002 11:33:41 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGIELJEFAA.nickf@ontko.com> (raw)
In-Reply-To: <3C6D3684.9040101@kencast.com>

I don't know yet if it will help me. (I was doing empirical research when I
ran into my problem.) My reasoning went like this:

Since using a function in my "where" clause forces postgresql to do a table
scan instead of using my index on the field, I was hoping to build an index
on the function, which *would* get used. I'm pretty sure this will work, but
I'll post my results to the list if I find that it doesn't work.

-Nick



> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Wei Weng
> Sent: Friday, February 15, 2002 11:26 AM
> To: pgsql-sql@postgresql.org
> Subject: [SQL] create index on function - why?
>
>
> I can understand the rationale behind creating index on tables, it
> speeds up the searching.
>
> But what is the rationale behind creating index on a function? how does
> it help with the database performance?
>
> Thank you.
>
> --
> Wei Weng
> Network Software Engineer
> KenCast Inc.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>




view thread (10+ messages)  latest in thread

Message-ID: <NEBBLAAHGLEEPCGOBHDGIELJEFAA.nickf@ontko.com>
Permalink:  ../NEBBLAAHGLEEPCGOBHDGIELJEFAA.nickf@ontko.com/
Also on:    postgresql.org/message-id/NEBBLAAHGLEEPCGOBHDGIELJEFAA.nickf@ontko.com

 · 

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: nickf@ontko.com, wweng@kencast.com
  Subject: Re: create index on function - why?
  In-Reply-To: <NEBBLAAHGLEEPCGOBHDGIELJEFAA.nickf@ontko.com>

* 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