jamcito napisaĆ(a):
/*********************************************/
SET constraint_exclusion=on;
SET
SHOW constraint_exclusion;
constraint_exclusion
----------------------
on
(1 row)
EXPLAIN SELECT * FROM data WHERE name = 'aaa';
QUERY PLAN
------------------------------------------------------------------------
Result (cost=0.00..24.42 rows=7 width=48)
-> Append (cost=0.00..24.42 rows=7 width=48)
-> Seq Scan on data (cost=0.00..22.38 rows=5 width=48)
Filter: ((name)::text = 'aaa'::text)
-> Seq Scan on data_a data (cost=0.00..1.02 rows=1 width=23)
Filter: ((name)::text = 'aaa'::text)
-> Seq Scan on data_b data (cost=0.00..1.02 rows=1 width=23)
Filter: ((name)::text = 'aaa'::text)
(8 rows)
Can you show what you get from:
EXPLAIN SELECT * FROM data WHERE name LIKE 'a%'
?
Irek.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings