Re: [Bacula-users] case insensitive query

2006-04-23 Thread Cedric Tefft
Cedric Tefft wrote: Robert Nelson wrote: You can also try "select Name from Filename where CAST(Name AS CHAR) = 'makedev';". On my machine it was somewhat faster than CONVERT. Out of curiosity, I plugged the CAST() function in to query.sql and ran a real bacula search for 'makedev'. I

Re: [Bacula-users] case insensitive query

2006-04-23 Thread Cedric Tefft
Robert Nelson wrote: You can also try "select Name from Filename where CAST(Name AS CHAR) = 'makedev';". On my machine it was somewhat faster than CONVERT. Out of curiosity, I plugged the CAST() function in to query.sql and ran a real bacula search for 'makedev'. I did this three times and

RE: [Bacula-users] case insensitive query

2006-04-21 Thread Robert Nelson
AM To: Troy Daniels Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] case insensitive query Troy Daniels wrote: > An update to this. > > I cant vouch for this exact query - on my system it takes a looonnggg > time to finish due to the 2 million plus files recorded

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Cedric Tefft
Troy Daniels wrote: An update to this. I cant vouch for this exact query - on my system it takes a looonnggg time to finish due to the 2 million plus files recorded and I gave up and canceled it, but the following simplified version worked: mysql> select Name from Filename where LCASE(Name)

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Troy Daniels
An update to my update - I ran my query against a smaller bacula db (Only just over 700k files in this one) and after 5m 38s of waiting it returned a case insensitive matching list of files. Without the LCASE() function it took 1m 49s for the same query to be performed. So thats just over 3

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Troy Daniels
An update to this. I cant vouch for this exact query - on my system it takes a looonnggg time to finish due to the 2 million plus files recorded and I gave up and canceled it, but the following simplified version worked: mysql> select Name from Filename where LCASE(Name) = 'makedev'; +---

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Troy Daniels
Doh! I have to admit a failure to test this particular query. I've used the technique on other queries tho and just applied it to this scenario. I completely missed the reference to the filename field being binary too - too much work, not enough time! My bad! Sorry! Troy. Cedric Tefft wr

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Cedric Tefft
Troy Daniels wrote: Under MySQL you can use the LCASE() (Or UCASE if you prefer) function to do something like: SELECT DISTINCT Job.JobId as JobId, Client.Name as Client, Path.Path,Filename.Name,StartTime,Level,JobFiles,JobBytes FROM Client,Job,File,Filename,Path WHERE Client.ClientId=Job.C

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Cedric Tefft
Mark Nienberg wrote: I'm using Bacula to back up a Linux Samba fileserver among other machines. Of course the clients to the fileserver are windows machines and they don't care about case in filenames. They create all sorts of case combinations like "document1.doc", "Document2.DOC" and so o

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Troy Daniels
Under MySQL you can use the LCASE() (Or UCASE if you prefer) function to do something like: SELECT DISTINCT Job.JobId as JobId, Client.Name as Client, Path.Path,Filename.Name,StartTime,Level,JobFiles,JobBytes FROM Client,Job,File,Filename,Path WHERE Client.ClientId=Job.ClientId AND JobStatus

Re: [Bacula-users] case insensitive query

2006-04-19 Thread Dominic Marks
Mark Nienberg wrote: I'm using Bacula to back up a Linux Samba fileserver among other machines. Of course the clients to the fileserver are windows machines and they don't care about case in filenames. They create all sorts of case combinations like "document1.doc", "Document2.DOC" and so on.

[Bacula-users] case insensitive query

2006-04-18 Thread Mark Nienberg
I'm using Bacula to back up a Linux Samba fileserver among other machines. Of course the clients to the fileserver are windows machines and they don't care about case in filenames. They create all sorts of case combinations like "document1.doc", "Document2.DOC" and so on. My most common rest