On Jun 11, 2:01 pm, "Andrus" <kobrule...@xxxxxx> wrote: (...) > > This index makes no sense at all: > > CREATE INDEX dok_dokumnr_idx ON firma1.dok USING btree (dokumnr); > > I listed table structure and constraints partially. > Theis is also primary key constraint in dok table: > > CONSTRAINT dok_pkey PRIMARY KEY (dokumnr), On a sidenote: this primary implements a unique index anyway. The additional index is useless. You can delete it to save time and storage. (Or maybe this is just another discrepancy between reality and problem description.) Regards Erwin