Re: [HACKERS] Planner issue

2013-10-14 Thread Soroosh Sardari
On Mon, Oct 14, 2013 at 10:55 AM, Tom Lane wrote: > Soroosh Sardari writes: > > I developed a new character string type, named myvarchar. > > Also an operator class for btree is added. > > PROBLEM: > > When I executed a query with where clause on 'mine' column, PG does not > use > > index. > > M

Re: [HACKERS] Planner issue

2013-10-14 Thread Tom Lane
Soroosh Sardari writes: > I developed a new character string type, named myvarchar. > Also an operator class for btree is added. > PROBLEM: > When I executed a query with where clause on 'mine' column, PG does not use > index. Most likely you got the opclass definition wrong. Since you've shown

Fwd: [HACKERS] Planner issue

2013-10-14 Thread Soroosh Sardari
> 2013/10/14 Soroosh Sardari > >> Hi >> >> I developed a new character string type, named myvarchar. >> Also an operator class for btree is added. >> >> I created a table with two columns, first have myvarchar(100) and other >> is >> varchar(100). >> >> CREATE TABLE test_myvarchar (mine myvarchar

Re: [HACKERS] Planner issue

2013-10-14 Thread Pavel Stehule
Hello pls, send a output of EXPLAIN ANALYZE statement, there can be different reasons why optimizer doesn't choose some index Regards Pavel Stehule 2013/10/14 Soroosh Sardari > Hi > > I developed a new character string type, named myvarchar. > Also an operator class for btree is added. > >

[HACKERS] Planner issue

2013-10-13 Thread Soroosh Sardari
Hi I developed a new character string type, named myvarchar. Also an operator class for btree is added. I created a table with two columns, first have myvarchar(100) and other is varchar(100). CREATE TABLE test_myvarchar (mine myvarchar(100), plain varchar(100)); CREATE INDEX test_myvarchar_i_

Re: [HACKERS] planner issue with constraint exclusion

2008-12-15 Thread Tom Lane
"Joshua D. Drake" writes: > On Mon, 2008-12-15 at 14:28 -0500, Tom Lane wrote: >> "Joshua D. Drake" writes: >>> Of the functions the only one that will use constraint_exclusion is the >>> one that explicitly passes the date value. >> >> Since you haven't shown us the constraints you're talking a

Re: [HACKERS] planner issue with constraint exclusion

2008-12-15 Thread Stephen Frost
* Joshua D. Drake (j...@commandprompt.com) wrote: > On Mon, 2008-12-15 at 14:28 -0500, Tom Lane wrote: > > "Joshua D. Drake" writes: > > > Of the functions the only one that will use constraint_exclusion is the > > > one that explicitly passes the date value. > > > > Since you haven't shown us th

Re: [HACKERS] planner issue with constraint exclusion

2008-12-15 Thread Joshua D. Drake
On Mon, 2008-12-15 at 14:28 -0500, Tom Lane wrote: > "Joshua D. Drake" writes: > > Of the functions the only one that will use constraint_exclusion is the > > one that explicitly passes the date value. > > Since you haven't shown us the constraints you're talking about, or the > resulting plans,

Re: [HACKERS] planner issue with constraint exclusion

2008-12-15 Thread Tom Lane
"Joshua D. Drake" writes: > Of the functions the only one that will use constraint_exclusion is the > one that explicitly passes the date value. Since you haven't shown us the constraints you're talking about, or the resulting plans, it's difficult for anyone to guess what's going on.

[HACKERS] planner issue with constraint exclusion

2008-12-15 Thread Joshua D. Drake
Hello, I ran into this problem recently: https://projects.commandprompt.com/public/replicator/pastebin?show=f1288d4d8%0D Of the functions the only one that will use constraint_exclusion is the one that explicitly passes the date value. I kind of get why except for the one that uses EXECUTE. As E