Re: [sqlite] Optimising usage of LIKE

2010-05-03 Thread Tim Romano
By "version" I meant "implementation". On Mon, May 3, 2010 at 7:25 AM, Tim Romano wrote: > Which version of SQLite are you using? If LIKE has been overridden in the > implementation you're using, it won't have the advantage of an index > whatever the collation, in which case you might consider G

[sqlite] Optimising usage of LIKE

2010-05-03 Thread Ian Hardingham
Hey guys. For various embarrassing reasons, I'm using: SELECT x FROM userTable WHERE name LIKE 'name' To look up entries in my account table. Basically, the scripting language I'm using which hooks into SQLite is a bit case-agnostic. I've been told by a friend that this is extremely ineffici

Re: [sqlite] Optimising usage of LIKE

2010-05-03 Thread Tim Romano
Which version of SQLite are you using? If LIKE has been overridden in the implementation you're using, it won't have the advantage of an index whatever the collation, in which case you might consider GLOB though it is case-sensitive. Regards Tim Romano __

Re: [sqlite] Optimising usage of LIKE

2010-05-03 Thread Black, Michael (IS)
n of SQLite Database Subject: Re: [sqlite] Optimising usage of LIKE Simon's answer is probably best -- without any benchmarks it makes the most sense. You've got at least two solutions that don't require changing your data: SELECT x FROM userTable WHERE upper(name) = upper(

Re: [sqlite] Optimising usage of LIKE

2010-05-03 Thread Black, Michael (IS)
;name); Michael D. Black Senior Scientist Northrop Grumman Mission Systems From: sqlite-users-boun...@sqlite.org on behalf of Simon Slavin Sent: Mon 5/3/2010 5:33 AM To: i...@omroth.com; General Discussion of SQLite Database Subject: Re: [sqlite] Optimisi

Re: [sqlite] Optimising usage of LIKE

2010-05-03 Thread Simon Slavin
On 3 May 2010, at 9:53am, Ian Hardingham wrote: > For various embarrassing reasons, I'm using: > > SELECT x FROM userTable WHERE name LIKE 'name' > > To look up entries in my account table. Basically, the scripting > language I'm using which hooks into SQLite is a bit case-agnostic. > > I'v

[sqlite] Optimising usage of LIKE

2010-05-03 Thread Ian Hardingham
Hey guys. For various embarrassing reasons, I'm using: SELECT x FROM userTable WHERE name LIKE 'name' To look up entries in my account table. Basically, the scripting language I'm using which hooks into SQLite is a bit case-agnostic. I've been told by a friend that this is extremely ineffici