From: | <g(dot)hintermayer(at)inode(dot)at> |
---|---|
To: | <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: indices - used by which user ? |
Date: | 2003-05-08 08:34:08 |
Message-ID: | 14541.213.33.72.146.1052382848.squirrel@webmail.inode.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
After investigating further, I found out, that the index will also be not
used if I do a psql -U postgres <database>, unless I issue a \c command,
in fact even \c - does it.
The other thing I found out: the joined colums are of type character
varying(10) and text, in this case the index (of the table having the text
column) will be used (after the \c trick), I have similiar other
databases, where both joined columns have the same type (character
varying(10)) and the index is never ever used, which does'nt make sense to
me.
Don't ask me wy the types are different, might be due to a dump/reload
during several upgrades.
Fact is, that the runtime of the query in the other (those having equal
types) databases is about as fast as in the one with different types when
using indices.
But why does joining columns with different types use indices, whereas
equal type joins do not use indices.
Gerhard
From | Date | Subject | |
---|---|---|---|
Next Message | Manfred Koizar | 2003-05-08 09:15:00 | Re: indices - used by which user ? |
Previous Message | g.hintermayer | 2003-05-08 07:20:31 | Re: indices - used by which user ? |