Search Postgresql Archives

Re: How to force the parser to use index scan instead of

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/07/06 21:10, Jaime Casanova wrote:
> On 6 Oct 2006 22:32:16 -0700, ck <ck.karthic@xxxxxxxxx> wrote:
[snip]
>> index scan, Eg
>> select * from h057 where h057001 = 1142::int8
>> the above query uses index scan
>> select * from h057 where h057001 = 1142
>> the above query uses sequential scan.
> 
> that's because in 7.3 you must cast to the type of the indexed column
> in order to use the indexes...
> 
> had you never seen this?
> 
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>      choose an index scan if your joining column's datatypes do not
>      match

And the default data type for a scalar constant is int4.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFKGD9S9HxQb37XmcRAk+qAJ9BdmEvE8Iug641O7XBnl/AAxiUwwCfWV3V
J1hBmh26MHOcAQ+Fur6EP2U=
=GOPt
-----END PGP SIGNATURE-----


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux