Why doesn't it use indexes? - Mailing list pgsql-sql

From Ahti Legonkov
Subject Why doesn't it use indexes?
Date
Msg-id 3D21CAF3.8090508@127.0.0.1
Whole thread Raw
Responses Re: Why doesn't it use indexes?  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Re: Why doesn't it use indexes?  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-sql
Hi,

I have this query:
select * from reo inner join usr on reo.owner_id=usr.user_id

I also have created these indexes:
CREATE INDEX "owner_id_reo_key" ON reo (owner_id);
CREATE INDEX "user_id_user_key" ON usr (user_id);

Explain tells me this:
Merge Join  (cost=1341.74..1481.12 rows=299697 width=461)  ->  Sort  (cost=775.05..775.05 rows=6629 width=328)
-> Seq Scan on apartment_reo reo  (cost=0.00..354.29 rows=6629 
 
width=328)  ->  Sort  (cost=566.69..566.69 rows=4521 width=133)        ->  Seq Scan on USER usr  (cost=0.00..292.21
rows=4521width=133)
 

Why it does not use indexes I have created?

-- 
Ahti Legonkov





pgsql-sql by date:

Previous
From: Ricardo Javier Aranibar León
Date:
Subject: constraint
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: constraint