Re: [GENERAL] usage of indexes for inner joins

2007-10-01 Thread Jan Theodore Galkowski
thanks for all your useful comments. i will study all of them. a couple of inline comments below, just for clarification to the group, marked with asterisks. On Mon, 1 Oct 2007 13:13:23 -0500, "Scott Marlowe" <[EMAIL PROTECTED]> said: > On 10/1/07, Jan Theodore Galkowski <[EMAIL PROTECTED]> wrot

Re: [GENERAL] usage of indexes for inner joins

2007-10-01 Thread Scott Marlowe
On 10/1/07, Jan Theodore Galkowski <[EMAIL PROTECTED]> wrote: > Scott, > > i didn't think this belonged in the general list, but the example i gave > for discussion was a toy, for illustration. i could not very well post > the actual example for many reasons, including proprietary ones and, > give

Re: [GENERAL] usage of indexes for inner joins

2007-10-01 Thread Scott Marlowe
On 9/27/07, Jan Theodore Galkowski <[EMAIL PROTECTED]> wrote: > I fear this has been asked many times about PostgreSQL, and I have read > the docs about how indexes are supposed to be defined and used, but I > don't understand why the engine and optimizer is doing what it does in > the simplest of

Re: [GENERAL] usage of indexes for inner joins

2007-10-01 Thread Ben Trewern
Sequence scans of an empty table are going to be faster than an index scan, so the database uses the sequence scan. Put some data in the tables (some thousands or millions of records) and then see if it uses an index scan. Ben ""Jan Theodore Galkowski"" <[EMAIL PROTECTED]> wrote in message ne

Re: [GENERAL] usage of indexes for inner joins

2007-09-27 Thread Tom Lane
"Jan Theodore Galkowski" <[EMAIL PROTECTED]> writes: > Total runtime: .169 ms ; > Like *how* *come*? You have a problem with 0.1 ms runtime? But to correct your obvious misunderstanding: yes, the plan depends on the table size, as well it should. regards, tom lane -