Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 63B899F9357 for ; Sat, 16 Dec 2006 16:23:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 88931-06 for ; Sat, 16 Dec 2006 16:22:56 -0400 (AST) X-Greylist: delayed 00:06:39.927335 by SQLgrey-1.7.4 Received: from mx1.wp.pl (mx1.wp.pl [212.77.101.5]) by postgresql.org (Postfix) with ESMTP id D31B69F9FB2 for ; Sat, 16 Dec 2006 16:22:58 -0400 (AST) Received: (wp-smtpd smtp.wp.pl 18474 invoked from network); 16 Dec 2006 21:16:16 +0100 Received: from aaxt50.neoplus.adsl.tpnet.pl (HELO [127.0.0.1]) (ipluta@[83.6.105.50]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with SMTP for ; 16 Dec 2006 21:16:16 +0100 Message-ID: <4584540D.2080208@wp.pl> Date: Sat, 16 Dec 2006 21:16:13 +0100 From: Ireneusz Pluta User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: jamcito CC: pgsql-performance@postgresql.org Subject: Re: partition text/varchar check problem References: <458402D4.7080500@poczta.fm> In-Reply-To: <458402D4.7080500@poczta.fm> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO AS1=NO(Body=2 Fuz1=2 Fuz2=2) AS2=NO(0.643744) AS3=NO AS4=NO AS5=NO X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/444 X-Sequence-Number: 22500 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.