New version of open source MySQL appliance

2009-03-04 Thread Liraz Siri
Hello everyone, We just released a new version of our MySQL appliance: http://www.turnkeylinux.org/appliances/mysql In a nutshell, this is an extremely easy way to get a MySQL instance up and running on your server or VM (VMware, VirtualBox, Xen, KVM) of choice in just a couple of minutes. Chan

Re: Select query locks tables in Innodb

2009-03-04 Thread Baron Schwartz
I don't think it locks the tables. The behavior may be similar, but I seriously doubt that's what's happening. Take a snapshot of SHOW INNODB STATUS while this is going on. And use mysqladmin debug and check the error log. Then put those in some pastebin and send us the link. And realize that

Re: Why is simple query not using index?

2009-03-04 Thread David Karr
On Tue, Mar 3, 2009 at 6:51 PM, Perrin Harkins wrote: > My guess would be that your table is too small to bother using an > index on. There's some information in the MySQL docs about when it > chooses to use an index. For small tables, using one makes the query > slower. I think this is likel

Re: SQL_NO_CACHE

2009-03-04 Thread Johan De Meersman
On Wed, Mar 4, 2009 at 8:42 PM, Morten Primdahl wrote: > around while trying to figure out why the first query was slow and the > subsequent snappy. Given that you posted that a MySQL restart does not change anything, but a system restart does, I put my money on the filesystem cache having buffer

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
Baron, I am using 5.0.37. While it may be true that there is a bug that shows tables as being locked when they really aren't, I do not think that applies here. I do know that when a table shows a status of 'Locked' in the Navicat Server Monitor that the transaction which created and is proce

how to sanitize mysql_connect?

2009-03-04 Thread PJ
I hope this is the right list as it concerns mysql and php ??? I just realized that an open connection is necessary to usemysql_real_escape_string...So how do you sanitize an include page used to open a connection This is the page // db1.php // SQL login parameters for local environment $local_dbho

Re: SQL_NO_CACHE

2009-03-04 Thread Morten Primdahl
On Mar 4, 2009, at 8:38 PM, Jocelyn Fournier wrote: Just curious : if there's no index on the column why don't you try to add one ? That's probably why it takes a lot of time on the production machine. Hehe.. I can understand why you ask, I over simplified the question which was wrong of

Re: MySQL Log and Data directories

2009-03-04 Thread Baron Schwartz
On Wed, Mar 4, 2009 at 1:22 PM, wrote: > On a high read/write load.. is it good to split log (binlogs, innodb txn > logs) and data (all tables, innodb tablespace) in different partitions ? > > Anybody had any experience ? > > For example; out of 25 disks array with 142GB 1rpm... I would like

Re: SQL_NO_CACHE

2009-03-04 Thread Jocelyn Fournier
Just curious : if there's no index on the column why don't you try to add one ? That's probably why it takes a lot of time on the production machine. Jocelyn Le 04/03/2009 18:26, Morten Primdahl a écrit : Thanks for all the suggestions. The caching must be done somewhere else. There is no

Re: Select query locks tables in Innodb

2009-03-04 Thread Baron Schwartz
Carl, Locked status in SHOW PROCESSLIST and a table being locked are different. There is a bug in MySQL that shows Locked status for queries accessing InnoDB tables in some cases. What version of MySQL are you using? The table is not really locked, you're just seeing that as a side effect of wh

Re: Select query locks tables in Innodb

2009-03-04 Thread Baron Schwartz
Carl, Locked status in SHOW PROCESSLIST and a table being locked are different. There is a bug in MySQL that shows Locked status for queries accessing InnoDB tables in some cases. What version of MySQL are you using? The table is not really locked, you're just seeing that as a side effect of wh

5.1 Reference Manual

2009-03-04 Thread Jerry Schwartz
When I upgraded from 5.0 to 5.1, I fetched the 5.1 reference manual. Is it my imagination, or is this thing messed up? Searching for a term comes up with nothing (try "Varchar"), and the index is not in alphabetical order. Regards, Jerry Schwartz The Infoshop by Global Information Incorpo

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
I did check that all tables are Innodb. I was using the Navicat Server Monitor because I know that when I see the monitor reporting a status of locked during an attempted query, that user comes to a complete halt until the lock is cleared (usually by the bad query finishing.) I will check th

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
One more note. Perrin asked if I was using any select... for update. The answer is no, neither in the select query that seems to be locking the tables nor in the queries that are processing transactions. Surprisingly, one of the tables that reports being locked is never accessed in the repo

Re: Select query locks tables in Innodb

2009-03-04 Thread Perrin Harkins
2009/3/4 Carl : > However, when I had all the pieces in the query > (copy attached), I could easily see it was locking tables using the Server > Monitor in Navicat. I don't know what that is, but I think you'd better look at something closer to the bone, like SHOW INNODB STATUS. > Explain (copy a

Re: MySQL Log and Data directories

2009-03-04 Thread dbrb2002-sql
Lets say HP Modular Storage/Smart Array.. http://h18006.www1.hp.com/storage/disk_storage/msa_diskarrays/san_arrays/index.html From: Chaim Rieger Subject: Re: MySQL Log and Data directories To: "Michael Dykman" Cc: dbrb2002-...@yahoo.com, mysql@lists.mysql.com Date: Wednesday, March 4, 2009, 10:

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
Under stress (having transaction entered), the query shows that it is still locking the tables. I rewrote the query and tested it step by step but could not tell whether tyhe partially complete query was locking tables because it ran so fast. However, when I had all the pieces in the query (c

Re: MySQL Log and Data directories

2009-03-04 Thread Chaim Rieger
Michael Dykman wrote: On Wed, Mar 4, 2009 at 1:22 PM, wrote: On a high read/write load.. is it good to split log (binlogs, innodb txn logs) and data (all tables, innodb tablespace) in different partitions ? Anybody had any experience ? For example; out of 25 disks array with 142GB 1rpm.

Re: MySQL Log and Data directories

2009-03-04 Thread Michael Dykman
On Wed, Mar 4, 2009 at 1:22 PM, wrote: > On a high read/write load.. is it good to split log (binlogs, innodb txn > logs) and data (all tables, innodb tablespace) in different partitions ? > > Anybody had any experience ? > > For example; out of 25 disks array with 142GB 1rpm... I would like

MySQL Community Server 5.1.32 has been released

2009-03-04 Thread Kent Boortz
Dear MySQL users, MySQL Community Server 5.1.32, a new version of the popular Open Source Database Management System, has been released. MySQL 5.1.32 is recommended for use on production systems. For an overview of what's new in MySQL 5.1, please see http://dev.mysql.com/doc/refman/5.1/en/mys

MySQL Log and Data directories

2009-03-04 Thread dbrb2002-sql
On a high read/write load.. is it good to split log (binlogs, innodb txn logs) and data (all tables, innodb tablespace) in different partitions ? Anybody had any experience ? For example; out of 25 disks array with 142GB 1rpm... I would like to keep few disks to logs and rest to data .. is

Re: SQL_NO_CACHE

2009-03-04 Thread Micah
I did some tests a couple of weeks ago, using using SQL_NO_CACHE and clearing out the OS buffer after each query was enough to give me consistent results that were based on system load rather than cache efficiency. These two are by far the major factors in my experience, although no doubt other

Re: SQL_NO_CACHE

2009-03-04 Thread jocelyn fournier
MySQL Key buffer and OS cache could also have an impact. Have you tried disabling the Key Buffer first ? Jocelyn Le 04/03/2009 18:26, Morten Primdahl a écrit : Thanks for all the suggestions. The caching must be done somewhere else. There is no index on the column and there are about 500.00

Re: SQL_NO_CACHE

2009-03-04 Thread Morten Primdahl
Thanks for all the suggestions. The caching must be done somewhere else. There is no index on the column and there are about 500.000 rows in the table. A MySQL restart doesn't "flush" the cache in play, but a full restart of my laptop does (OS X). I may be chasing the wrong problem, but w

Re: SQL_NO_CACHE

2009-03-04 Thread jocelyn fournier
If SQL_NO_CACHE is specify, the cache will never be used : The Query Cache behaviour is quite simple, it uses the exact given query syntax as a hash to search into the query cache; it means writing 'select' or 'SELECT' is different. It also means adding SQL_NO_CACHE will search in the cache for

Re: SQL_NO_CACHE

2009-03-04 Thread Perrin Harkins
On Wed, Mar 4, 2009 at 11:23 AM, Thomas Spahni wrote: > SQL_NO_CACHE means that the query result is not cached. It does not mean > that the cache is not used to answer the query. Oh, right, he's looking for this: SET SESSION query_cache_type=off; - Perrin -- MySQL General Mailing List For lis

Re: SQL_NO_CACHE

2009-03-04 Thread Thomas Spahni
On Wed, 4 Mar 2009, Morten wrote: Hi, I was hoping that using SQL_NO_CACHE would help me bypass the query cache, but judging from the below it doesn't. What can I do to avoid the query cache? Thanks. Morten mysql> select count(*) from users where email = 'hello'; +--+ | count(*) |

Re: SQL_NO_CACHE

2009-03-04 Thread Perrin Harkins
On Wed, Mar 4, 2009 at 10:27 AM, Morten wrote: > Hi, I was hoping that using SQL_NO_CACHE would help me bypass the query > cache, but judging from the below it doesn't. You probably just brought the data into the cache and are not hitting the query cache. - Perrin -- MySQL General Mailing List

Re: SQL_NO_CACHE

2009-03-04 Thread Micah Stevens
Keep in mind the file system caches too, so it might be working, but the file access is still getting put in memory. You should disable that too if you really want consistent results. In Linux you can dump the file system cache between each query, I have no clue how to do it in windows or other sy

SQL_NO_CACHE

2009-03-04 Thread Morten
Hi, I was hoping that using SQL_NO_CACHE would help me bypass the query cache, but judging from the below it doesn't. What can I do to avoid the query cache? Thanks. Morten mysql> select count(*) from users where email = 'hello'; +--+ | count(*) | +--+ |0 | +-

view doesn't refresh inside transaction

2009-03-04 Thread Ingo Weiss
Hi all, I have a view that is joining two base tables. I can update through the view, but insert only through the base tables. Now I am having the problem that seems to boil down to the following: When I insert into the base tables inside a transaction, the view doesn't seem to update. Only after

Re: Finding replicated database

2009-03-04 Thread Baron Schwartz
Hi, On Wed, Mar 4, 2009 at 7:25 AM, Thomas Spahni wrote: > Hi > > I'm stuck with the following problem: > > SLAVE has a bunch of databases of which one or two are replicated from > MASTER. > > I'm writing a shell script to be run by an ordinary user on SLAVE. This > script should know which of th

Re: Select query locks tables in Innodb

2009-03-04 Thread Carl
Thanks to all of you. The key was the 107488 rows. I restructured the query so that it started with something smaller and it 1) runs faster (I'm guessing the reduced use of temp space) and 2) did not seem to cause any locking problems (I will test this under load today.) I have attached a c

Finding replicated database

2009-03-04 Thread Thomas Spahni
Hi I'm stuck with the following problem: SLAVE has a bunch of databases of which one or two are replicated from MASTER. I'm writing a shell script to be run by an ordinary user on SLAVE. This script should know which of the databases on SLAVE are replicated. Configuration: MASTER has --bin