Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mladen Gogala Newsgroups: comp.databases.postgresql Subject: Re: Case-insensitive select Date: Mon, 5 Sep 2011 10:53:28 +0000 (UTC) Organization: solani.org Lines: 42 Message-ID: References: <25ee8bf2-869c-427b-a4a4-5faf86f92d57@o26g2000vbi.googlegroups.com> <1314860211.105064@proxy.dienste.wien.at> <1314888079.999065@proxy.dienste.wien.at> <1314950920.382293@proxy.dienste.wien.at> <1315208734.245902@proxy.dienste.wien.at> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1315220008 14154 eJwFwYEBwCAIA7CXQGmZ52CR/09Ygk2nMggGBtNHps3iscyBPOSGdlpHrZzvjVSItnVv2fsBGw4Rew== (5 Sep 2011 10:53:28 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 5 Sep 2011 10:53:28 +0000 (UTC) User-Agent: Pan/0.133 (House of Butterflies) X-User-ID: eJwFwYEBgDAIA7CXYJQ6zwGk/59gkkHnPGASqdT6+FwBjZUNPVGtuX1YBdixiY1sdQff/X4uYBHa Cancel-Lock: sha1:iNRyuSDHw9zM6a+9qxGfyPKoPY8= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BLPE0AOWUU/xJ2B6fyi0PwYLGHs+3mNi1vAXDU7iudTUdHj92qtpLVPpcdCXnl+bwlkWDIiM1HvbqVP9YFGZg= Xref: x330-a1.tempe.blueboxinc.net comp.databases.postgresql:232 On Mon, 05 Sep 2011 09:45:13 +0200, Laurenz Albe wrote: > > Why do you claim that without a test? This is PostgreSQL 9.1: > > CREATE TABLE test(id serial primary key, val varchar(20) NOT NULL); > > DO $$BEGIN > FOR i IN 1..10000 LOOP > INSERT INTO test(val) VALUES (substr(random()::text, 3)); > END LOOP; > END;$$; > > CREATE INDEX test_val_ind ON test(lower(val)); > > SHOW default_statistics_target; > > default_statistics_target > --------------------------- > 100 > (1 row) > > ANALYZE test; > > SELECT array_length(histogram_bounds, 1) FROM pg_stats > WHERE tablename = 'test_val_ind'; > > array_length > -------------- > 101 > (1 row) > > Yours, > Laurenz Albe I don't understand? What does this prove? That there is a histogram on lower(val)? How does your example prove that? -- http://mgogala.byethost5.com