Re: [GENERAL] help understanding explain output

2011-02-16 Thread pasman pasmański
> Naturally a boolean can only have two values, really? pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] help understanding explain output

2011-02-15 Thread Rob Sargent
Luca Ferrari wrote: Hello, I've got a doubt about partial indexes and the path chosen by the optimizer. Consider this simple scenario: CREATE TABLE p( pk serial NOT NULL , val2 text, val1 text, b boolean, PRIMARY KEY (pk) ); INSERT INTO p(pk, val1, val2, b) VALUES( generate_series(1,100),

Re: [GENERAL] help understanding explain output

2011-02-15 Thread Tom Lane
Guillaume Lelarge writes: > Le 15/02/2011 15:49, Luca Ferrari a écrit : >> So a sequential scan. I know that the optimizer will not consider an index >> if >> it is not filtering, but I don't understand exactly why in this case. > Accessing a page in an index is way costier then accessing a pag

Re: [GENERAL] help understanding explain output

2011-02-15 Thread Chris
On 16/02/11 01:49, Luca Ferrari wrote: Hello, I've got a doubt about partial indexes and the path chosen by the optimizer. Consider this simple scenario: CREATE TABLE p( pk serial NOT NULL , val2 text, val1 text, b boolean, PRIMARY KEY (pk) ); INSERT INTO p(pk, val1, val2, b) VALUES( generate_se

Re: [GENERAL] help understanding explain output

2011-02-15 Thread Guillaume Lelarge
Le 15/02/2011 15:49, Luca Ferrari a écrit : > Hello, > I've got a doubt about partial indexes and the path chosen by the optimizer. > Consider this simple scenario: > > CREATE TABLE p( pk serial NOT NULL , val2 text, val1 text, b boolean, PRIMARY > KEY (pk) ); > INSERT INTO p(pk, val1, val2, b) V

[GENERAL] help understanding explain output

2011-02-15 Thread Luca Ferrari
Hello, I've got a doubt about partial indexes and the path chosen by the optimizer. Consider this simple scenario: CREATE TABLE p( pk serial NOT NULL , val2 text, val1 text, b boolean, PRIMARY KEY (pk) ); INSERT INTO p(pk, val1, val2, b) VALUES( generate_series(1,100), 'val1b', 'val2b', true