> I've changed default_statistics_target to 10000 and I think that is a > reason. > That's certainly going to cost you something, but this seems like a mighty large slowdown, especially for a non-join query. What datatype is te.idtr, anyway? Integer not null and primary key of t_positions table. Table t_positions has about 1500000 records, table t_st about 130000 records. ------------------------------------------- Artur Zajac -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance