Re: BUG #3500: Horrible performance when wrong type is set in prepared statement

From: Joseph S <jks(at)selectacast(dot)net>
To: Flavio Botelho <fbotelho(at)stj(dot)gov(dot)br>
Subject: Re: BUG #3500: Horrible performance when wrong type is set in prepared statement
Date: 2007-07-31 22:31:07
Message-ID: 46AFB82B.2090401@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Flavio Botelho wrote:

> I know the application should not be doing this. But i wonder if lots of the
> complaints about postgres performance couldnt be related to problems like
> this. I suggest that you change the behaviour of something like that from
> silently accepting the string value to throwing an error.
>
Well that would be bad. I still have a lot of code with numbers inside
quotes to work around the old postgres bug where index scans weren't
used unless the numbers were in quotes (because the table columns were
int2's and passed in numbers were assumed to be ints)

Do you have EXPLAIN output showing the difference in your queries if the
values are in strings or not?

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Decibel! 2007-08-01 00:59:46 Oddities with ANYARRAY
Previous Message Joseph S 2007-07-31 22:26:46 EXPLAIN ANALYZE for bitmapAnd and bitmapOr scans always reports rows = 0