Re: 7.3.1 New install, large queries are slow - Mailing list pgsql-performance

From Tom Lane
Subject Re: 7.3.1 New install, large queries are slow
Date
Msg-id 11880.1042816277@sss.pgh.pa.us
Whole thread Raw
In response to Re: 7.3.1 New install, large queries are slow  (Jeff <threshar@torgo.978.org>)
List pgsql-performance
Jeff <threshar@torgo.978.org> writes:
> Perhaps this should go on the TODO - when one side is an int8 and the
> other is a literal number assume the number to be int8 instead of int4?

It's been on TODO for so long that it's buried near the bottom.

* Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
  float4, numeric/decimal too [optimizer]

This behavior interacts with enough other stuff that we can't just
change it willy-nilly.  See many past discussions in the pghackers
archives if you want details.  A recent example of a promising-looking
fix crashing and burning is
http://fts.postgresql.org/db/mw/msg.html?mid=1357121

            regards, tom lane

pgsql-performance by date:

Previous
From: Timur Irmatov
Date:
Subject: Re: index usage
Next
From: Andrew Sullivan
Date:
Subject: Re: 7.3.1 New install, large queries are slow