Hello, pgsql-sql. I have customize simple query with join two tables:
xxxx=# \d sites Таблица "public.sites" Колонка | Тип | Модификаторы ---------+------------------------+----------------------- name | character varying(255) | not null rem | text | enabled | boolean | not null default true Index: "pk_sites" primary key, btree (oid) xxxx=# \d site_screens -------------+------------------------+-------------- id_site | oid | not null screen_name | character varying(255) | not null screen_code | text | Foreign keys: "$1" FOREIGN KEY (id_site) REFERENCES sites(oid) xxxx=# explain select * from sites s join site_screens ss on s.oid = ss.id_site; QUERY PLAN --------------------------------------------------------------------------- Hash Join (cost=...) Hash Cond: ("outer".id_site = "inner".oid) -> Seq Scan on site_screens ss (cost=...) -> Hash (cost=...) -> Seq Scan on sites s (cost=...) I want to Index Scan. What must I do? -- Regards, Mihail Nasedkin mailto:[EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster