Skip site navigation (1) Skip section navigation (2)

Re: plpgsql and index usage

From: Ryan Mahoney <ryan(at)flowlabs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plpgsql and index usage
Date: 2002-12-21 21:12:50
Message-ID: b2m90v4h4aiiltgcr591ehqpggoglfsp2v@4ax.com (view raw or flat)
Thread:
Lists: pgsql-hackers
>>  Are you suggesting that I:
>> 	a. use a different datatype in plpgsql or 
>> 	b. cast the values or
>> 	c. change the data type in the table
>
>Yes ;-).  Presumably (b) would be the least painful route, but any of
>these would do the trick.

It turns out that the text and char(5) were not the problem - it was
an integer field that was passed into the function as a text (the
proximity field)!  It now utilizes the index and has gone from taking
over 7 seconds to complete to .011 seconds!

I love postgres!

Thanks Tom!

-r


In response to

pgsql-hackers by date

Next:From: Darren JohnsonDate: 2002-12-22 01:58:58
Subject: Re: PostgreSQL-R
Previous:From: Tom LaneDate: 2002-12-21 16:40:03
Subject: Re: Resource management in 7.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group