Re: Index not being used ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Index not being used ?
Date: 2003-09-04 03:27:16
Message-ID: 7217.1062646036@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> writes:
> Quotes and casting together are not necessary.

Check.

> I'd choose "lid = 457::int2" since it's telling PG what the datatype
> is, whereas with lid = '457', PG must figure it out.

I'd lean to the quotes, actually, since that way your application's
code isn't so dependent on the particular datatypes in the table.
I doubt there's any performance advantage to writing the cast, if
that's what you were thinking ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-04 04:11:32 Re: Comparing dates
Previous Message Christopher Browne 2003-09-04 03:26:32 Re: delivering database stand-alone