Search Postgresql Archives

Re: where (x,y,z) in ((x1,y1, z1), (x1,y1, z1), (x1,y1, z1), (x2,y2, z2)) (not) optimized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= <gryzman@xxxxxxxxx> writes:
> why :
> select * from foo where X in (1,1,1,1,1,1,1,1) --- same values in search.
> never gets optimized by planner, etc ?

We actually did that, before 8.0 or thereabouts.  It was removed because
it cost a lot of planner cycles for *every* query, and helped for only
a small number of stupidly-written ones.

In general, you can probably remove such duplicates on the client side
more efficiently than the database could anyway (realizing that whatever
it might do has to be datatype-independent).

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux