Zhu: Dimi1947: AND means both have to contain P
Clyatt: Dimi1947: Is it your first day at computer ?
Iiams: OR would be either one matching P
Clyatt: Dimi1947: Then you should know what AND does and how it differs from what OR does. Do you?
Stokley: Or did the job.I had tried this where a and b like.
Clyatt: Dimi1947: Do you know what AND does and how it differs from what OR does?
Hussien: Boleware: I just noticed the user was being a moron and had both 1,2 and 2,1 but the one with 2,1 was on another page in the UI!
Plume: Yes.I just had problem using them within the contex of sql
Clyatt: Dimi1947: The context doesn’t matter
Minster: AND:both are true.OR:either is true
Clyatt: Dimi1947: Correct. So in your case you should be able to tell the difference between: 1 WHERE u.lastname LIKE ‘%P%’ OR u.lastname LIKE ‘%P%’ and 2 WHERE u.lastname LIKE ‘%P%’ AND u.lastname LIKE ‘%P%’ and use the one you want
Clyatt: Dimi1947: Sorry I put the same column there
Tarrence: Yes.as I said that problem was that I used this: WHERE u.lastname or b.compname LIKE ‘%P%’
Clyatt: Dimi1947: Should be: 1 WHERE u.lastname LIKE ‘%P%’ OR u.name LIKE ‘%P%’ and 2 WHERE u.lastname LIKE ‘%P%’ AND u.name LIKE ‘%P%’
Clyatt: Dimi1947: What problem?
Aldana: Dont’you see the difference between your correct code and minewrong?
Clyatt: Dimi1947: I not only see it, but I told you long ago why it is wrong
Clyatt: Dimi1947: Unless indeed this is exactly what you want to do :
Brier: Salle: what’s this boost thing that 5.7 needs?
Lebby: Sorry to interrupt your deep conversation.
Clyatt: Kittinger: Don’t you expect that I would prefer 5.7 to be the last MySQL version? :
Atkeson: How can I tune query? explain extended select url,count* as cfrom http_logs where t = DATE_SUBNOW, INTERVAL 24 HOUR group by url order by c desc limit 10
Benn: So to group by about 3 million rows. it takes many seconds
Semidey: Salle: ah are you a seal and not a dolphin?
Clyatt: Saml: First ask EXPLAIN
Capo: Can this kind of group by query be tunened? salle already did. explain extended
Clyatt: Kittinger: I love both animals to be honest despite that both of them are ferocious predators
Wiggains: Dolphins kill sharks, seals are chum.
Orielley: 1 SIMPLE http_logs range t t 8 NULL 2955715 Using where; Using temporary; Using filesort
Clyatt: Saml: EXPLAIN can tell if it can be tuned, but I can’t read your mind so I can’t
Kihn: It’s just explain my query right?
Munford: Does it print tuning suggestions if there are possible tuning options?
Clyatt: Kittinger: Some dolphins only not all. And I doubt any shark will dare to attack leopard seal. As far as I know even the superior sea preadators – the orcas stay away from them
Castongvay: I guess using temporary; using filesort could be problem
Discenza: Saml: INDEXt, url could make it a little faster
Clyatt: Saml: You can’t avoid filesort so all you can do is to make sure the result fits into the memory to avoid temp table on disk
Pajtas: You can’t expect huge gains when processing 3mln rows
Clyatt: Boleware: ORDER BY COUNT* DESC .
Saleem: Http://pastie.org/private/ow2fxy9upywwbtlyrsyl4a
Posey: SELECT default_character_set_name FROM information_schema.SCHEMATA shows mostly latin1 . is it safe for me to change everything to utf8?
Venezia: BlaDe: that’s just the defaults for each schema, you can change them with ALTER DATABASE
Venezia: Yeah, perfectly safe, but it won’t convert existing latin1 stuff
Venezia: And do remember that utf8 is slower than latin1
Venezia: But of course important when needed