Re: why does "select * from table oder by indexed_field" not use key?

2012-07-11 Thread Ewen Fortune
Hi, On Wed, Jul 11, 2012 at 10:31 AM, Reindl Harald wrote: > the mysql query optimizer is somehow stupid Its not stupid - remember its not trying to find the best index, rather its trying to find the least costly plan to return the data in the quickest manner. For the optimizer in this case it

Re: What MySQL-flavor to choose.

2011-02-14 Thread Ewen Fortune
Hi, > Also after reading Dimitrik blog > (http://dimitrik.free.fr/blog/archives/2010/07/mysql-performance-innodb-io-capacity-flushing.html), > its seems to me , than one of the thing that are different between the > stock mysql (5.5) and xtradb, is the way that they handle IO capacity > and flush.

Re: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Ewen Fortune
gt; haven't used it, I'd be curious why not or what turned you "away" from it? I work for Percona :o) So I think its best someone else chips in. Ewen > >> -Original Message- >> From: Ewen Fortune [mailto:ewen.fort...@gmail.com] >> Sent: Thursday,

Re: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Ewen Fortune
Daevid, > My concern is, my gut tells me that the built in mysql cache system is > "dumb". And by that I mean, I suspect that mySQL isn't "smart" enough to > strip out comments from the SQL statement string BEFORE storing it as the > cache hash key (yet I have no facts either way to back it up an

Re: innodb backup

2010-10-11 Thread ewen fortune
Hi, On Sat, Oct 9, 2010 at 4:21 AM, wrote: > Hello, > > Is there any good document for backup of InnoDB? > includes the increment backup and full backup. There is an overview of backups here http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html XtraBackup supports incremental backups for

Re: Best Bin log - type in MYSQL

2010-05-04 Thread ewen fortune
Vikram, > I am using win-server and xp for my master, slave setup. when i do the > beginTrans with bin-log = STATEMENT it is causing error. If i defined this > with any one of the following, its working quite fine. MIXED, ROW. > > Which is the best one in the above two? Or how it differs? > Can

Re: Specific benchmarking tool

2009-11-24 Thread ewen fortune
egular log ? > > > On Sat, Nov 14, 2009 at 1:23 AM, Johan De Meersman > wrote: >> >> hmm, I got segfaults. i,ll check after the weekend. >> >> On 11/13/09, ewen fortune wrote: >> > Johan, >> > >> > What does? mk-log-player? - I just used i

Re: Specific benchmarking tool

2009-11-13 Thread ewen fortune
Johan, The very latest version of mk-log-player can do that. If you get the version from trunk: wget http://www.maatkit.org/trunk/mk-log-player mk-log-player --split Thread_id --type genlog Cheers, Ewen On Fri, Nov 13, 2009 at 4:33 PM, Johan De Meersman wrote: > Hey all, > > I'm looking for

Re: How to "REPLACE" updating when it's a subset of the primary key what is duplicated or inserting otherwise?

2009-10-07 Thread ewen fortune
Fernando, On Wed, Oct 7, 2009 at 5:08 PM, Fer C. wrote: > Hello > I have a table with a compound primary key (a1,a2) and I want to > insert a record (b1,b2) in th cases where there's no a1 value matching > b1, and if there's already a b1 value in the form (b1,c2) then just > update it so that it

Re: Best way to convert character set from "latin1 to utf8" for existing database?

2009-06-01 Thread ewen fortune
Uma, On Mon, Jun 1, 2009 at 8:41 AM, Uma Bhat wrote: > Hi All, > > I have read many blogs suggesting some examples for this. > But suggestions from you guys who have ACTUALLY worked on such a scenario > would help me out the best. > > > Current Database has: > DEFAULT CHARACTER SET - latin1 > DEF

Re: Recover data without logs

2009-06-01 Thread ewen fortune
Weitao, On Sun, May 31, 2009 at 10:13 AM, Weitao Liu wrote: > I had deleted some important data from my mysql server,who can tell how can > I recover my data,I do not open the bin log,is there some other method? If you are using InnoDB you may be able to recovery the data from the pages if you d

Re: ibdata1 lost

2009-05-27 Thread ewen fortune
Sebastien, On Wed, May 27, 2009 at 11:35 AM, Sebastien MORETTI wrote: >>> I think it's too late for this, because the MySQL server has been >>> restarted. >> >> >> You may be able to recover from the file system. So long as you >> haven't written lots of data to the file system since the loss th

Re: ibdata1 lost

2009-05-27 Thread ewen fortune
Sebastien, On Wed, May 27, 2009 at 11:24 AM, Sebastien MORETTI wrote: >> Hi, >> >> Your data is gone (unless you can undelete it from whatever filesystems >> you're using). > > I think it's too late for this, because the MySQL server has been restarted. You may be able to recover from the file

Re: size of database on disk

2009-04-28 Thread ewen fortune
Hi, On Mon, Apr 27, 2009 at 7:33 PM, Randomcoder wrote: > Hi, > > I'm using Mysql on Linux. > How can I see the space a certain database is taking on disk ? If you are using MyISAM you can pretty much just use du -sh /path/to/$table Alternatively you can query the information_schema http://www

Re: mysqldump failing to load data

2009-04-02 Thread ewen fortune
Hi, On Thu, Apr 2, 2009 at 1:18 PM, Virgilio Quilario wrote: >> Hi, >> >> MySQL v4.1.22 on Linux 2.6.18-6-686 >> >> I have a dump file generate with mysqldump created by a version 4.1.10 >> server. >> >> I want to import the dump file into a different server. When I run >> >> mysqldump --databas

Re: MySQL versus PostgreSQL for GPS Data

2009-03-18 Thread ewen fortune
Juan, On Wed, Mar 18, 2009 at 11:14 AM, Juan Pereira wrote: > Hello, > > I'm currently developing a program for centralizing the vehicle fleet GPS > information -http://openggd.sourceforge.net-, written in C++. > > The database should have these requirements: > > - The schema for this kind of dat

Re: Is there any solution

2009-03-17 Thread ewen fortune
Kishhna, On Tue, Mar 17, 2009 at 4:13 PM, Krishna Chandra Prajapati wrote: > Hi list, > > THE IDEA IS TO HAVE A COMMON LOGIN > > I have two mysql servers with different databases on each of them. > > I want to search each databases(few tables) on both the server using a > single login(mysql conne

Re: Does MySQL 5.1 store queries?

2009-03-17 Thread ewen fortune
Mat, On Tue, Mar 17, 2009 at 2:04 PM, Matthew Stuart wrote: > Until recently I have been using 4.0.25 and have just upgraded to 5.1 and > just wondered if MySQL now enabled me to store queries in the database > rather than have to put them all on my pages. Basically, I want to be able > to write

Re: what will happen if the disk is full when mysql flush binlog to it

2009-03-16 Thread ewen fortune
Hi Cui, On Sat, Mar 14, 2009 at 4:33 PM, Cui Shijun wrote: > hi, >  What will happen if the disk is full when mysql flush binlog to it? > >  If I use innodb engine(mysql-5.1.22) and turn on the binlog, is > there any chance > that mysql has data updated without binlog flushed? > >  Will mysql ret

Re: [OFFTOPIC] PHP and local-infile

2009-02-18 Thread ewen fortune
Hi Mauricio, On Wed, Feb 18, 2009 at 12:58 AM, Mauricio Tellez wrote: > Hi, sorry if this is an offtopic. I have a web site with LAMP, one module > use a "LOAD DATA LOCAL INFILE" statement, all was running fine, but today I > ran this module and I get an "The used command is not allowed with this

Re: Why do quotes in an IN() clause effect performance so drastically?

2009-02-18 Thread ewen fortune
Hi David, On Wed, Feb 18, 2009 at 4:25 AM, Daevid Vincent wrote: > I'm really confused. First, I don't understand why quoting my IN() > values here caused them to run significantly slower than the non-quoted > versions... on just this simple contrived example it can be as much as > 2.2 seconds vs

Re: How to get an existing mysql server's build configure option

2009-02-13 Thread ewen fortune
Hi Ethan, On Fri, Feb 13, 2009 at 10:50 AM, Ethan Chang wrote: > Hi All, > > I installed a binary mysql version from > http://mysql.mirror.kangaroot.net/Downloads/MySQL-5.1/mysql-5.1.31-linux-i686-glibc23.tar.gz > > I'm curious if I want to make some further personalized build from source. > How

Re: grabbing even addresses?

2009-02-02 Thread ewen fortune
Hi Jason, On Mon, Feb 2, 2009 at 7:27 PM, Jason Pruim wrote: > Hello! > > I was wondering if something was possible, I have an excel file right now of > US mailing addresses, and what I need to do is select all the odd numbered > addresses on one road, is there an easy way I can do that from MySQ

Re: Restarting MySQLD when all transactions are complete

2009-01-14 Thread ewen fortune
Hi, On Wed, Jan 14, 2009 at 3:00 PM, John Daisley wrote: > Hi, > > Probably a simple question for someone who knows :) > > Is there a way to force MySQLD to restart after it has finished processing > all current transactions? > > I seem to remember from the bit of Oracle work I did in the past w

Re: Performance tips

2008-12-27 Thread ewen fortune
LL rows: 26 Extra: Using index Cheers, Ewen On Sat, Dec 27, 2008 at 8:04 PM, ewen fortune wrote: > Hi, > > On Sat, Dec 27, 2008 at 6:15 PM, Chris Picton wrote: >> Hi >> >> I am trying to get to grips with understanding mysql performance. >> >

Re: Performance tips

2008-12-27 Thread ewen fortune
Hi, On Sat, Dec 27, 2008 at 6:15 PM, Chris Picton wrote: > Hi > > I am trying to get to grips with understanding mysql performance. > > I have the following query: > > select sql_no_cache count(*), date_format(calldate, '%y-%m-%d') as m from > cdr_warehouse group by m; > > This gives me: > 115 ro

Re: MySQL 5.0.67 on SMP

2008-12-16 Thread ewen fortune
Hi, I think the known problems with MySQL and SMP architecture are more based on storage engine restrictions, so InnoDB for example does not scale well beyond say 8 cores. There are a number of patches to help solve some of these scaling problems. http://www.percona.com/docs/wiki/release:start ht

Re: MySQL Guru Needed!!

2008-12-12 Thread Ewen Fortune
As an alternative you also have www.percona.com www.pythian.com www.openquery.com.au www.provenscaling.com Percona's minimum billing unit is 15 minutes, not sure about the rest On Dec 12, 2008, at 17:35, "bruce" wrote: Hi. I've got a situation where I need to reach out/talk to a mysql guru

Re: Replication

2008-12-08 Thread ewen fortune
Hi, On Mon, Dec 8, 2008 at 9:20 AM, Marcel Grandemange <[EMAIL PROTECTED]> wrote: >>WHat errors are you getting when you try and start the slave? > > That's the exact thing > > mysql> show slave status\G > *** 1. row *** > Slave_IO_St

Re: Replication

2008-12-05 Thread ewen fortune
Hi Marcel, On Fri, Dec 5, 2008 at 2:02 PM, Marcel Grandemange <[EMAIL PROTECTED]> wrote: > Good Day. > > Im wondering if someone can assist me. > > Ive been using replication for a while now and it tends to fail very easily. Do you have the error messages?. > > One of my sites lost connectivity

Re: Mysql and Flashback

2008-11-25 Thread ewen fortune
Hi Shain, If you are using InnoDB its possible to patch to allow this functionality. Percona are in the early stages of developing a patch specifically to allow flashback type access to previous table states. https://bugs.launchpad.net/percona-patches/+bug/301925 If you wanted to go down the sl

Re: Calculate total size of InnoDB tables?

2008-09-12 Thread ewen fortune
Hi, You can get that from the information_schema, check out this post from Peter Zaitsev http://www.mysqlperformanceblog.com/2008/03/17/researching-your-mysql-table-sizes/ Ewen On Fri, Sep 12, 2008 at 10:25 PM, Ryan Schwartz <[EMAIL PROTECTED]> wrote: > Is there an easy way to calculate the to

Re: INDEXING ALL COLUMNS

2008-09-05 Thread ewen fortune
iler_student_status ( > student_id decimal(22,0) NOT NULL default '0', > param varchar(128) NOT NULL default '', > value varchar(128) default NULL, > PRIMARY KEY (student_id,param). > KEY idx_value (value) > ) > > On Sat, Sep 6, 2008 at 1:16 AM,

Re: INDEXING ALL COLUMNS

2008-09-05 Thread ewen fortune
Hi, Following on from what Mike mentioned, indexing all columns does not really help as MySQL will at most use one index for a query, so its important to pick your indexes carefully and consider constructing composite indexes. An index on a single column may not even be used due to poor cardinalit

Re: sync

2008-09-01 Thread ewen fortune
Hi, Have you tried mk-table-sync from the Maatkit toolset http://www.maatkit.org/tools.html Ewen On Mon, Sep 1, 2008 at 2:12 PM, Mad Unix <[EMAIL PROTECTED]> wrote: > I was wandering if anyone know a good way to sync 2mysql databases _one_way > The mysql is alocated on a web php application. >

Re: escape a dash in table name

2008-08-28 Thread ewen fortune
Using backticks `temp-08-08-28` Cheers, Ewen On Thu, Aug 28, 2008 at 1:01 PM, Dan O'Keefe <[EMAIL PROTECTED]> wrote: > How do you escape a dash in a table name such as temp-08-08-28? > > Thanks, > > Dan > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To un

Re: delaying replication

2008-08-26 Thread ewen fortune
Hi, You do this with mk-slave-delay from the Maatkit toolkit. http://www.maatkit.org/tools.html "This tool implements delayed replication on the slave by sampling binlog positions, then starting and stopping the slave as needed to make the slave lag its master by a specified amount. It does not

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread ewen fortune
Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws --- CONCAT() returns NULL if any argument is NULL. CONCAT_WS() does not skip empty strings. However, it does skip any NULL values after the separator argument --- Ewen On Wed, May 14, 2