Search Postgresql Archives

Re: Partial index with regexp not working

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

 



Richard Huxton <dev@xxxxxxxxxxxx> writes:
> The planner isn't smart enough to figure out which queries can use this 
> index by examining them, it just looks for (NOT paid) in the WHERE 
> clause and if it doesn't find it, ignores the index.

Well, it's a little bit brighter than that: it has some smarts about
btree-indexable comparisons and about null-testing.  For instance, it
can figure out that "x > 3" implies "x > 0", and so a query WHERE x > 3
could use a partial index WHERE x > 0.  Also, assuming that the >
operator is strict, it would recognize that WHERE x IS NOT NULL is
implied.

But there's certainly not anything in there that can make inferences
about regex matches.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[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