Re: MySQL slowlog - only in file?

2012-05-14 Thread P.R.Karthik
Hi Rafal, If there are more slow queries in your server and logging them into a table will increase the IO of the server. It is better to be in a file. The slow query log file can be processed easily by pt-query-digesthttp://www.percona.com/doc/percona-toolkit/2.1/pt-query-digest.html .

MySQL 5.1.59 - slow_log purge problem.

2012-05-14 Thread Rafał Radecki
Hi all. I write a script to delete rows from slow_log older than 2 weeks. #!/bin/bash if [ $# -ne 1 ]; then echo Usage: $0 mysql_config_file exit 1 fi SELECTQUERY=select * from slow_log where start_time DATE_ADD(NOW(),INTERVAL - 2 WEEK) DELETEQUERY=delete from slow_log where start_time

Re: MySQL slowlog - only in file?

2012-05-14 Thread Carsten Pedersen
Alternatively, you can copy the data into another table easily: http://www.bitbybit.dk/carsten/blog/?p=115 Best, / Carsten On 14.05.2012 09:34, P.R.Karthik wrote: Hi Rafal, If there are more slow queries in your server and logging them into a table will increase the IO of the server. It is

RE: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this

2012-05-14 Thread Steven Staples
-Original Message- From: Andrés Tello [mailto:mr.crip...@gmail.com] Sent: May 12, 2012 10:08 AM To: mysql Subject: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this While doning a batch process... show full processlist show: | 544

Re: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Johan De Meersman
- Original Message - From: Baron Schwartz ba...@xaprb.com Bugs Fixed * Security Fix: Bug #64884 was fixed. * Security Fix: Bug #59387 was fixed. Anyone want to elaborate on the nature or severity of the security problem? Both are private / inaccessible to me.

RE: MySQL slowlog - only in file?

2012-05-14 Thread David Lerer
Alternatively, you could use MySQL Enterprise Monitor (Oracle) and capture the queries for very easy analysis. I have found it very effective, especially when you have very high number of queries per second. I have not noticed any impact on database performance. David. -Original

Re: drop partitions

2012-05-14 Thread Johan De Meersman
- Original Message - From: Rick James rja...@yahoo-inc.com If you have 14 partitions in each of 390 tables, and if you have most of the tables 'active', then you are possibly thrashing in the table_open_cache. A distinct possibility. Compute (SHOW STATUS): Opened_tables / Uptime

ANN: 70% Ten Year Anniversary discount on all our products!

2012-05-14 Thread Martijn Tonies
Upscene Productions is celebrating it's 10 year anniversary with a massive discount on all our products: 70% discount until the end of May. Don't forgot to blog and twitter about this! We produce database development, management and testing tools for: * Oracle * Microsoft SQL Server * MySQL *

Re: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this

2012-05-14 Thread Ananda Kumar
is accountid a number or varchar column On Sat, May 12, 2012 at 7:38 PM, Andrés Tello mr.crip...@gmail.com wrote: While doning a batch process... show full processlist show: | 544 | prod | 90.0.0.51:51262 | tmz2012 | Query |6 | end | update `account` set

Re: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread Johan De Meersman
- Original Message - From: Baron Schwartz ba...@xaprb.com Because it can be resolved by rolling back just one of them. Why destroy ALL the work people are trying to accomplish, if you could just throw away some of it? What I fail to understand, Baron, is how there can be a deadlock

Re: multiple instances in win 7 -- any idea

2012-05-14 Thread Shawn Green
On 5/13/2012 6:53 PM, Brown, Charles wrote: I'm trying to install multiple instances of mysql on windows 7, 64bit. 3hrs into the job, I'm not making progress. Does anyone have an idea? 1) The installers are designed to work on single-instance installs or upgrades. 2) You only need one

RE: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread David Lerer
Going on a limb here...: I believe I have occurred similar issue (i.e. two transactions go into an indefinite wait).Though, very infrequent occurrence. My only explanation at that time was that there is some loophole when the deletes/inserts had some impact also on the table indexes. In

Re: New Fast MySQL Compatible Server (Take 2)

2012-05-14 Thread Johan De Meersman
- Original Message - From: Hiromichi Watari hiromichiwat...@yahoo.com I uploaded the technology whitepaper to the website. Hmm, interesting idea, to allocate a thread per table - I can imagine it's going to be pretty heavy on the thread cache, though :-) How does it respond to

Re: drop partitions

2012-05-14 Thread louis liu
not actually , first partition to have been dropped is no longer in use ,we dropped partition from old - new 2012/5/14 Johan De Meersman vegiv...@tuxera.be - Original Message - From: Rick James rja...@yahoo-inc.com If you have 14 partitions in each of 390 tables, and if you

Re: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this

2012-05-14 Thread Andrés Tello
Yes, I'm using indexes, accountid is the primary key, and is numeric and autoincrement. The process doing the deadlock is no longer done... The structure of the inserted database has changed. Originaly it was a single table with 219millions rows, now I partitioned the hable in... 60 tables, 1

Re: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this

2012-05-14 Thread Ananda Kumar
If numeric, then why are u using quotes. With quotes, mysql will ignore the index and do a full table scan On Mon, May 14, 2012 at 7:31 PM, Andrés Tello mr.crip...@gmail.com wrote: Yes, I'm using indexes, accountid is the primary key, and is numeric and autoincrement. The process doing the

Re: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Govinda
Bugs Fixed * Security Fix: Bug #64884 was fixed. * Security Fix: Bug #59387 was fixed. Anyone want to elaborate on the nature or severity of the security problem? Both are private / inaccessible to me. Bug #64884 was apparently also applicable to, and fixed in 5.5.24 - would be

Re: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this

2012-05-14 Thread Johan De Meersman
- Original Message - From: Ananda Kumar anan...@gmail.com If numeric, then why are u using quotes. With quotes, mysql will ignore the index and do a full table scan Will it? Common sense dictates that it would convert to the column's native type before comparing; and a quick explain

Re: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread Baron Schwartz
Argh. I meant to send this to the list but it doesn't have the reply-to set as I expect... the usual gripe On Mon, May 14, 2012 at 10:46 AM, Baron Schwartz ba...@xaprb.com wrote: Johan, On Mon, May 14, 2012 at 9:27 AM, Johan De Meersman vegiv...@tuxera.be wrote: What I fail to understand,

Re: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Johan De Meersman
- Original Message - From: Govinda govinda.webdnat...@gmail.com 1.) Is anyone *who knows what he is doing* still using mysql_real_escape_string()? Ever? I seem to vaguely remember someone showing me some code that would bypass escaping; but I didn't really pay a lot of attention,

Re: Mysql is toying me... why sometimes an insert or update can be slow!? I getting bald cuz this

2012-05-14 Thread Ananda Kumar
I used to have these issues in mysql version 5.0.41. On Mon, May 14, 2012 at 8:13 PM, Johan De Meersman vegiv...@tuxera.bewrote: - Original Message - From: Ananda Kumar anan...@gmail.com If numeric, then why are u using quotes. With quotes, mysql will ignore the index and do a

Re: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Reindl Harald
Am 14.05.2012 16:50, schrieb Johan De Meersman: - Original Message - From: Govinda govinda.webdnat...@gmail.com 1.) Is anyone *who knows what he is doing* still using mysql_real_escape_string()? Ever? I seem to vaguely remember someone showing me some code that would bypass

Re: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread Claudio Nanni
In my experience if you have a poor designed code that run the same query for hundreds or thousands of times in a very short timespan (like some programmers do in for-loop instead of using a IN for example) you can put mysql on its knees, in some cases it may be the practical implementation of

RE: MySQL slowlog - only in file?

2012-05-14 Thread David Lerer
Alternatively, you could use MySQL Enterprise Monitor (Oracle) and capture the queries for very easy analysis. I have found it very effective, especially when you have very high number of queries per second. In turning on this capture, I have not noticed any impact on database performance.

Re: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Johan De Meersman
- Original Message - From: Reindl Harald h.rei...@thelounge.net but what about the dramatical reduced query-cache hits i see in some peace of software switching to prepared statements? dbmail2 as example had around 300 sql-actions per second dbmail3 using prepared statements

Re: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread Andrés Tello
Claudio, would you please extend the example to the use of in? On Mon, May 14, 2012 at 10:08 AM, Claudio Nanni claudio.na...@gmail.comwrote: In my experience if you have a poor designed code that run the same query for hundreds or thousands of times in a very short timespan (like some

Re: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread Claudio Nanni
Andrés, with pleasure. Imagine a website that is used to search, just for example, hotel rooms for booking. It is possible that a programmer would: 1) issue a select that returns the IDs the rooms matching the criteria 2) do a loop in the code scanning each ID of the resultset and for each ID

RE: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Rick James
What you do recommend in place of mysql_real_escape_string()? -Original Message- From: Govinda [mailto:govinda.webdnat...@gmail.com] Sent: Monday, May 14, 2012 7:34 AM To: Johan De Meersman Cc: mysql@lists.mysql.com Subject: Re: MySQL Community Server 5.1.63 has been released

RE: drop partitions

2012-05-14 Thread Rick James
Note that in many (too many) cases, _all_ partitions are opened, even if only one is really needed. -Original Message- From: louis liu [mailto:yloui...@gmail.com] Sent: Monday, May 14, 2012 7:02 AM To: Johan De Meersman Cc: mysql@lists.mysql.com; Rick James Subject: Re: drop

Performance question

2012-05-14 Thread Nicolas Rannou
Hi all, We are currently designing a database for our application (python/mysql) and we have some performance concern: We would have users and images. users can view some images. images can be viewed by several users. (n to m mapping) Which would be most efficient practice (regarding speed)? We

Re: Performance question

2012-05-14 Thread Reindl Harald
Am 14.05.2012 23:05, schrieb Nicolas Rannou: *1* to create 3 tables:* user - info about a user images - info about an image user_image_mapping *2* to create 2 tables* user - info about a user - a field would contain a list which represents the ids of the images the user can look at?

RE: Deadlock due lockwait. How can I tell mysql to wait longer?

2012-05-14 Thread Rick James
... WHERE id IN (...) -- This will (I think) sort the IN list. Therefore, if two queries have the same (or overlapping) IN values, there cannot be a deadlock. (I am assuming nothing else being touched.) If, on the other hand, you try to get a list of rows by other means, and the order of the

RE: MySQL Community Server 5.1.63 has been released

2012-05-14 Thread Rick James
What language are you working in? (Not all have binding) PREPARE might be using mysql_real_escape_string behind the scenes. :( Caching too much of the prepare would defeat one important feature of MySQL: It's ability to use a different query plan when given different constants.