Re: temp table and view/function/procedure dilemma

2011-04-07 Thread petya
Hi, You can always create any table from procedures. However, it seems to me that flexviews can solve all of your problems, take a look at it. It will provide you incrementally refreshable materialized views. Peter Boros On 04/05/2011 08:15 PM, Bgs wrote: Hi all, I have a problem here

Re: efficient use of varchar?

2011-04-06 Thread petya
Hi, There is difference between varchar(63) and varchar(38). Instead of selecting MAX(LENGTH()) you can do PROCEDURE ANALYZE() on the table, which will tell you about the optimal record type for the data you currently have in the table. When you are using inreasonably large varchar columns,

Re: Problem filtering with a like expression

2011-03-21 Thread petya
Hi, || isn't the concatenation operator by default. If you want it to be set sql_mode=PIPE_AS_CONCAT. Otherwise, use the CONCAT() function instead of || operator. Peter Boros On 03/21/2011 11:51 AM, Johan De Taeye wrote: I ran into this case where a like expression is not evaluated

Re: Backup Policy

2011-03-15 Thread petya
Hi, What storage engine are you using? Peter Boros On 03/15/2011 02:12 PM, Adarsh Sharma wrote: Dear all, Taking Backup is must needed task in Database Servers. I research a lot and find techniques to perform it in Mysql. We have options RAID, mylvmbackup , mysqldump. But it depends on the

Re: innodb buffer pool allocation question

2011-02-23 Thread petya
Hi, This is far more complicated than that. The buffer pool caches innodb pages. Not only data and indexes are stored on innodb pages. For example the undo log or the insert buffer are stored in innodb pages, therefore they are cached by the buffer pool. The simple answer is: in the buffer

Re: Converting INNODB to file-per-table?

2011-02-11 Thread petya
Hi, You can convert the tables themselves semi-online. Just do set global innodb_file_per_table=1; and no a no-operation alter on each table with alter table tablename engine=innodb; Note that the global variable is just a default, the currently connectd threads will use the shared

Re: Table creation

2011-01-31 Thread petya
Hi, You should check your error logs for innodb errors, there will be the key to the solution. If you want to avoid this behaviour, you can set innodb=force in your configuration file to make innodb error fatal, or set sql_mode to 'NO_ENGINE_SUBSTITUTION'. Peter Boros On 01/31/2011 08:21

Re: Stored procedure

2011-01-05 Thread petya
Hi, Use the mysql event scheduler instead of cron, the bash script is quite pointless, and call your stored procedure with now() - interval 1 day parameter. Peter On 01/05/2011 11:00 AM, Machiel Richards wrote: Good day all I am hoping that someone can assist me here.

Re: Stored procedure

2011-01-05 Thread petya
http://dev.mysql.com/doc/refman/5.1/en/events.html On 01/05/2011 12:21 PM, Machiel Richards wrote: HI How do I use the mysql event scheduler? I have not used this as yet so not sure how to use it. Regards Machiel -Original Message- *From*: petya pe...@petya.org.hu mailto:petya%20

Re: document for mysql performance improvement

2010-09-21 Thread petya
Hi, Check your slow queries first. Large full scans can cause unwanted disk io. Do you use MyISAM or InnoDB? From your status, you seem to have intensive MyISAM locking. Peter On 09/21/2010 04:10 PM, Johan De Meersman wrote: Also, mailing list doesn't want to distribute attachments :-)

Re: Two Primary Keys

2010-06-29 Thread petya
If you use innodb, primary key lookups are far faster than secondary indexes. Peter On 06/29/2010 03:34 PM, João Cândido de Souza Neto wrote: I think the real question is: What´s the purpose of any other field in my primary key if the first one is an auto_increment and will never repeat?

Re: Two Primary Keys

2010-06-29 Thread petya
You were talking about multiple fields in the primary key, not multiple primary keys. On 06/29/2010 03:51 PM, Johan De Meersman wrote: Correct, but you still can't have more than one primary key. Kind of defeats the idea of it being primary, really. On Tue, Jun 29, 2010 at 3:36 PM, petya pe

Re: high performance test data/test query generator

2009-06-06 Thread petya
, then extract the SQL statements into a separate file. You can use then use a tool such as mysqlslap (available since 5.1) to execute those statements in a number of iterations with a given concurrency on your benchmarking box. On Thu, Jun 4, 2009 at 2:05 PM, petya pe...@petya.org.hu wrote

Re: high performance test data/test query generator

2009-06-04 Thread petya
? Peter petya wrote: I use jmeter too, but it can't generate the test dataset (if I have to write this, I plan that it will create a jmeter test case with the generated test data). Usually my ad-hoc script generates csv files (to load initial data) and jmeter test cases. Michael Dykman wrote

high performance test data/test query generator

2009-06-03 Thread petya
Hi, We have lots of mysql servers, master-slave and sharded databases. A recurring task when a new feature/application comes in to test the database with real workload. This needs test data and test query generation. Until now I did this with ad-hoc scripts, I looked for tools to do this, so

Re: high performance test data/test query generator

2009-06-03 Thread petya
at 9:41 AM, petya pe...@petya.org.hu wrote: Hi, We have lots of mysql servers, master-slave and sharded databases. A recurring task when a new feature/application comes in to test the database with real workload. This needs test data and test query generation. Until now I did this with ad-hoc