Re: speeding imports

2007-07-17 Thread Andrew Hutchings
in > without options. You may also see a speed increase by adding the indexes after the data is inserted. -- Andrew Hutchings - LinuxJedi - http://www.linuxjedi.co.uk/ Windows is the path to the darkside...Windows leads to Blue Screen. Blue Screen leads to downtime. Downtime leads to su

Re: Select Last X rows

2007-06-30 Thread Andrew Hutchings
from table_name where ... order by last_update desc limit 10) as tbl order by tbl.last_update; Rich in Toronto I guess you could do: select * from table WHERE id > ((SELECT MAX(id) from table) - 10); Its not perfect, but it executes pretty fast for me. -- Andrew Hutchings - LinuxJed

Re: Error on ndbcluster database restore - Can't find record on

2007-06-29 Thread Andrew Hutchings
You need to do -r on node 2 as well, you have only restored half the data. -- Andrew Hutchings - LinuxJedi - http://www.linuxjedi.co.uk/ Windows is the path to the darkside...Windows leads to Blue Screen. Blue Screen leads to downtime. Downtime leads to suffering...I sense much Windows in you...

Re: How to optimize this long query

2007-06-28 Thread Andrew Hutchings
? > > Thank you very much for your help~ > > 22-06-2007 To answer point 2: Firstly, as previously stated by someone else you need to ditch the UCASE, performing functions on indexes pretty much voids the index. Secondly if you have a % before a word then you are going t