Re: Subquery taking too much time on 5.5.18?

2012-07-06 Thread Rik Wasmus
> See "The unbearable slowness of IN()" at > http://www.artfulsoftware.com/infotree/queries.php Do you read your own links? Excerpt: > In 5.0, EXISTS() is much faster than IN(), but slower than JOIN. In 5.5, EXISTS() performs about as well as JOIN. So judging by the subject line... -- My

Re: Subquery taking too much time on 5.5.18?

2012-07-06 Thread Peter Brawley
On 2012-07-06 5:07 PM, David Lerer wrote: Cabbar, try to replace the IN subquery with an EXISTS. Something like: SELECT * FROM A WHERE EXISTS (SELECT * FROM B WHERE A.id=B.A_ID and B.name like 'X%'); See "The unbearable slowness of IN()" at http://www.artfulsoftware.com/infotree/queries.

RE: Subquery taking too much time on 5.5.18?

2012-07-06 Thread David Lerer
Cabbar, try to replace the IN subquery with an EXISTS. Something like: SELECT * FROM A WHERE EXISTS (SELECT * FROM B WHERE A.id=B.A_ID and B.name like 'X%'); Does it help? David. -Original Message- From: Cabbar Duzayak [mailto:cab...@gmail.com] Sent: Friday, July 06, 2012 11:46 AM T

Re: Subquery taking too much time on 5.5.18?

2012-07-06 Thread Cabbar Duzayak
Benjamin: I tried this, but it is slow as well, but it went down to something like 20 seconds. Reindl: I was thinking about doing this on the app server side, but it consumes more memory + requires multiple roundtrips, that is why I wanted to do it on the mysql side. Also, like uses the index if

RE: Subquery taking too much time on 5.5.18?

2012-07-06 Thread Stillman, Benjamin
As far as I know, a B-tree index can be used by LIKE as long as the string doesn't begin with a wildcard. " LIKE 'X%' " should be fine to use an index on the name column. The index only includes results in the search base which start with X. That said, I probably wouldn't use a subquery, either

Re: Subquery taking too much time on 5.5.18?

2012-07-06 Thread Reindl Harald
Am 06.07.2012 17:46, schrieb Cabbar Duzayak: > Hi Everyone, > > I have been trying to understand why subqueries are taking tooo much > time on my installation of MySQL 5.5.18 on Ubuntu 11.10 release. > > In a nutshell, I have 2 tables: A and B. And, I do something like this: > > SELECT * FROM

Subquery taking too much time on 5.5.18?

2012-07-06 Thread Cabbar Duzayak
Hi Everyone, I have been trying to understand why subqueries are taking tooo much time on my installation of MySQL 5.5.18 on Ubuntu 11.10 release. In a nutshell, I have 2 tables: A and B. And, I do something like this: SELECT * FROM A WHERE A.id IN (SELECT A_ID FROM B WHERE B.name like 'X%'); T

Re: GA download reverted back to 5.5.24?

2012-07-06 Thread Andrew Moore
Charming, Noel. Are you Devops? :-D On Fri, Jul 6, 2012 at 3:09 AM, Noel Butler wrote: > ** > For those interested 5.5.25a has been released overnight, long after > oracle claimed it was there. > frankly., I think they ought to have use 5.5.26. > > To those who replied to me directly, a few fact

Re: GA download reverted back to 5.5.24?

2012-07-06 Thread Reindl Harald
Am 06.07.2012 04:09, schrieb Noel Butler: > For those interested 5.5.25a has been released overnight, long after oracle > claimed it was there. > > 2/ to the wanker who said people deserve what they get for untesting on DEV > bed first ... > this is true _IF_ it was a major release. (as I ho