和山です。 結果が出ないのはちょっとわかりませんが、 私の環境は8.1でしたのでMAX関数でINDEXが使われていますが、 それ以前ではINDEXは使用されません。 失礼しました。 http://www.postgresql.jp/document/pg810doc/html/release.html ですので、以下のように書き換える必用があります。 select * from shouhin as a,history as b where a.no=b.id and b.no = (select c.no from history c where c.id=a.no order by no desc limit 1);