LIKE without COLLATE ?

5 views
Skip to first unread message

Paul

unread,
Aug 13, 2021, 3:51:02 PMAug 13
to sequel-talk
Every time I use Sequel.like, it generates a LIKE with a COLLATE:

(([XDR_TO] COLLATE Latin1_General_CS_AS) LIKE ('%blah%' COLLATE Latin1_General_CS_AS) ESCAPE '\')

that COLLATE makes the SQL run like 3x slower than without the collate.... and I dont need the collate.

MSSQL server tells me the column is collated as:
SQL_Latin1_General_CP1_CI_AS

How to fix?




Jeremy Evans

unread,
Aug 13, 2021, 6:02:30 PMAug 13
to seque...@googlegroups.com
Sequel uses COLLATE by default on MSSQL to ensure consistent behavior across databases.  There isn't currently the ability to disable it, but considering the performance difference, I'll add support for that.

Thanks,
Jeremy

Jeremy Evans

unread,
Aug 13, 2021, 9:23:03 PMAug 13
to seque...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages