Re: [PERFORM] stats are way off on 8.4 b1

2009-04-18 Thread Grzegorz Jaśkiewicz
2009/4/18 Heikki Linnakangas : > Grzegorz Jaśkiewicz wrote: >> >> Can correlation be negative ? > > Yes, if the data in the column are in descending order. For example: > > postgres=# CREATE TABLE foo(id int4); > CREATE TABLE > postgres=# INSERT INTO foo SELECT 1000 - generate_series(1, 1000); > IN

Re: [PERFORM] stats are way off on 8.4 b1

2009-04-18 Thread Heikki Linnakangas
Grzegorz Jaśkiewicz wrote: Can correlation be negative ? Yes, if the data in the column are in descending order. For example: postgres=# CREATE TABLE foo(id int4); CREATE TABLE postgres=# INSERT INTO foo SELECT 1000 - generate_series(1, 1000); INSERT 0 1000 postgres=# ANALYZE foo; ANALYZE post