Re: [PERFORM] LIKE pattern

2016-05-12 Thread Jeff Janes
On Thu, May 12, 2016 at 8:13 AM, Robert Klemme wrote: > On Mon, May 9, 2016 at 11:41 PM, SoDupuDupu wrote: >> Владимир-3 wrote >>> It seems my quite complex query runs 10 times faster on "some_column >>> LIKE '%test_1' " vs "some_column LIKE 'test_1' " >>> So I just

Re: [PERFORM] LIKE pattern

2016-05-12 Thread Robert Klemme
On Mon, May 9, 2016 at 11:41 PM, SoDupuDupu wrote: > Владимир-3 wrote >> It seems my quite complex query runs 10 times faster on "some_column >> LIKE '%test_1' " vs "some_column LIKE 'test_1' " >> So I just add "%" to the pattern... > > Keep in mind then LIKE '%test_1' and LIKE 'test_1' are not

Re: [PERFORM] LIKE pattern

2016-05-12 Thread Tom Lane
Jeff Janes writes: > On Thu, May 12, 2016 at 8:13 AM, Robert Klemme > wrote: >> On Mon, May 9, 2016 at 11:41 PM, SoDupuDupu wrote: >>> Keep in mind then LIKE '%test_1' and LIKE 'test_1' are not equivalent, using >>> the % as a prefix to the