ORDER BY LIMIT issue

2010-08-04 Thread Kristian Davies
With the following query if I it returns 2 results it's fast .04s, if it has less results than the limit it takes 1minute. Query: select * from hub_dailies_sp where active='1' and date='2010-08-04' order by id desc LIMIT 2; Show create table: http://pastebin.org/447171 27,000 rows in table/view

Re: ORDER BY LIMIT issue

2010-08-04 Thread Kristian Davies
> Isn't it so that it firstly order the rows by id (index'ed?) and then scan >  it to pick the rows which satisfy the where clause? > > It stops when the result reaches the limit, otherwise scans the whole (27, > 000 rows scan). > > Then the response time with 2 rows limit by 2 can really depend. I

Re: Replication Error on Slave

2011-02-03 Thread Kristian Davies
> **On master server I have two databases *A and B*. App team use database B > temporarily for there application to  compute calculation and insert the > values on A database. For certain statements you could start with "SET SQL_BIN_LOG=0" so it doesn't log that statement, and it won't be replicat

Re: Seconds Behind the master 0 but in reality it's over 10 minutes or hours..

2011-09-06 Thread Kristian Davies
On Tue, Sep 6, 2011 at 6:12 AM, Rob Wultsch wrote: >> Hm. >> >> It seems we have sort of ethernet segment saturation problem. > > A possible bandaid/quick fix is turning on compression for mysql replication. We've had this exact same issue with a dodgy/overused wan link. If you are going to turn

Re: Questions about mysql-proxy...

2012-04-16 Thread Kristian Davies
On Fri, Apr 6, 2012 at 2:46 PM, shawn green wrote: > On 4/5/2012 3:14 PM, Wes Modes wrote: >> >> No one here has any experience with it? We use the proxy between master/slaves for the last 3 years. I didn't implement it, but I look after it. I'm just about to switch to 0.8.2, but the only real