Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Alexander Korotkov
On Thu, Feb 2, 2012 at 10:21 PM, Robert Haas wrote: > I'm having trouble figuring out under what set of circumstances spgist > is expected to be the best available alternative. It only supports a > small subset of the data types that GiST does, so I suppose the point > is that it should be faste

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Tom Lane
Robert Haas writes: > I'm having trouble figuring out under what set of circumstances spgist > is expected to be the best available alternative. It only supports a > small subset of the data types that GiST does, so I suppose the point > is that it should be faster for the cases that it does hand

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Robert Haas
On Thu, Feb 2, 2012 at 12:18 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Feb 1, 2012 at 10:57 PM, Tom Lane wrote: >>> Too lazy to look at the code right now, but I think indxpath.c contains >>> hardwired assumptions that LIKE prefix optimizations are only possible >>> with btree indexes

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Tom Lane
Robert Haas writes: > On Wed, Feb 1, 2012 at 10:57 PM, Tom Lane wrote: >> Too lazy to look at the code right now, but I think indxpath.c contains >> hardwired assumptions that LIKE prefix optimizations are only possible >> with btree indexes. Possibly it would be worth relaxing that. > Is it as

Re: [HACKERS] spgist text_ops and LIKE

2012-02-02 Thread Robert Haas
On Wed, Feb 1, 2012 at 10:57 PM, Tom Lane wrote: > Robert Haas writes: >> Is spgist intended to support prefix searches with LIKE? > > Too lazy to look at the code right now, but I think indxpath.c contains > hardwired assumptions that LIKE prefix optimizations are only possible > with btree inde

Re: [HACKERS] spgist text_ops and LIKE

2012-02-01 Thread Tom Lane
Robert Haas writes: > Is spgist intended to support prefix searches with LIKE? Too lazy to look at the code right now, but I think indxpath.c contains hardwired assumptions that LIKE prefix optimizations are only possible with btree indexes. Possibly it would be worth relaxing that. (The whole

[HACKERS] spgist text_ops and LIKE

2012-02-01 Thread Robert Haas
Is spgist intended to support prefix searches with LIKE? I ask because, first, it seems like something spgist ought to be good at (unless I'm confused), and, second, the text_ops opfamily includes these operators: ~<~(text,text) ~<=~(text,text) ~>=~(text,text) ~>~(text,text) ...which seems to