Re: Queue / FIFO in MySQL?

2009-09-07 Thread Alex Arul Lurthu
Please check out http://q4m.31tools.com/*. *It is a message queue storage engine with sql interface. Havent used it in a production setup though we did some tests. -- Thanks Alex http://alexlurthu.wordpress.com

Re: Reset of Status Parameters

2008-06-20 Thread Alex Arul Lurthu
I would also add Baron's maakit http://www.maatkit.org/ ( innotop ) for innodb details to the arsenal. On Fri, Jun 20, 2008 at 3:11 PM, Ian Simpson [EMAIL PROTECTED] wrote: I tend to use the 'mytop' program, which shows the average queries/second for the entire lifetime and for the last 5

Re: Very slow inserts into InnoDB tables

2008-06-13 Thread Alex Arul Lurthu
Please check if the my.cnf configurations to be the same. What are your configuration parameters in terms of innodh flush log trx commit , bin logging, sync binlog and innodb unsafe for binlog ? If the systems have raid, check if the BBWC is enabled on the new host and WB is enabled. On Fri,

Re: Very slow inserts into InnoDB tables

2008-06-13 Thread Alex Arul Lurthu
Variable_name: sync_binlog Value: 0 Variable_name: innodb_locks_unsafe_for_binlog Value: OFF Thanks -- Ian Simpson On Fri, 2008-06-13 at 17:43 +0530, Alex Arul Lurthu wrote: Please check if the my.cnf configurations to be the same. What are your configuration parameters

Re: Very slow inserts into InnoDB tables

2008-06-13 Thread Alex Arul Lurthu
The new server, which is just trying to handle replication Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 77.83 1367.55 2914.72 358474084 764029986 Thanks,  -- Ian Simpson On Fri, 2008-06-13 at 19:15 +0530, Alex Arul Lurthu wrote: also how often do you issue a commit. batching

Re: Circular replication

2007-12-05 Thread Alex Arul Lurthu
Chain replication is fine as long as reading stale data from the last slave in your chain is ok. the staleness depends on the write throughput and capacity of the intermediate slaves. But Chain replication with circular replication is a definite no no in prod since if any intermediate fails, you

Re: Determining Table Storage Engine Type on Crashed Table

2007-12-01 Thread Alex Arul Lurthu
How about looking at the .frm file of the table. On 11/28/07, Richard Edward Horner [EMAIL PROTECTED] wrote: FYI, this did not work :) Thanks though! Rich(ard) On Nov 23, 2007 3:37 AM, Paul McCullagh [EMAIL PROTECTED] wrote: Maybe this will work: SHOW CREATE TABLE table_name;

Re: show slave staus

2007-11-27 Thread Alex Arul Lurthu
You can set pager command to grep out unwanted fields. On 11/28/07, bruce [EMAIL PROTECTED] wrote: hi.. simple question!! mysql show slave status returns a number of fields, with information on the status of the slave. is there a way to only return the field(s) i'm interested in... i

Re: SELECT Speed

2007-11-26 Thread Alex Arul Lurthu
The second query might be faster due to caching. On 11/26/07, Alexander Bespalov [EMAIL PROTECTED] wrote: Hi, I have a problem with SELECT speed. The first execution takes up to several minutes while the next (with the same statement) takes not more then several seconds. The statement

Re: Database page corruption on disk occurring during mysqldump on a fresh database

2007-09-05 Thread Alex Arul Lurthu
The checksum errors might be due to various reasons. We had similar issue where we restored the database multiple times, replaced the ram sticks nothing helped. Finally we drilled down the issue to the chassis. Recommend testing the restore on a different machine to rule out any hardware issue.

Re: recovering from 'disk full' mysql error

2007-09-05 Thread Alex Arul Lurthu
stop slave; change master to master_log_file='Relay_Master_Log_File' , master_log_pos=Exec_master_log_pos; #Get the values for the above command from your show slave status output. start slave; The above process should fix your problem. On 9/4/07, Russell E Glaue [EMAIL PROTECTED] wrote: I

Re: Delete query question

2007-09-05 Thread Alex Arul Lurthu
reply inline On 9/5/07, Olaf Stein [EMAIL PROTECTED] wrote: delete from geno_260k where ident=(select ident from geno_260k where a1=0 group by ident having count(a1)25); When a sub query returns more than one row in a where clause, then = should be replaced by the in . -- Thanks Alex

Re: Simple questio SQL

2007-09-05 Thread Alex Arul Lurthu
select * from Products order by Visited desc limit 10; should give you the top 10 products. On 9/5/07, Tomas Abad [EMAIL PROTECTED] wrote: HI All, I have a Table and want to know the most visited products. Products - Id - Name - Visited

Re: innodb engine status

2007-08-29 Thread Alex Arul Lurthu
To have a good understanding on the show innodb status output checkout http://www.mysqlperformanceblog.com/2006/07/17/show-innodb-status-walk-through/ One area you can look at is the LATEST DETECTED DEADLOCK. But in most cases have found calculations on the status variables more helpful. -- Alex

Re: SCRIPT OR TOOL TO GIVE CHANGES IN DATABASES

2007-08-29 Thread Alex Arul Lurthu
If you want to track the schema level changes, updates, inserts etc you always have the binlogs/update logs. If you want to track select queries also you have the general query log. Check out http://dev.mysql.com/doc/refman/4.1/en/log-files.html for the different logs available. Of course be wary

Re: thread_concurrency in linux

2007-08-29 Thread Alex Arul Lurthu
I am not sure whether you are talking about innodb_thread_concurrency. If so please check out http://www.mysqlperformanceblog.com/2006/06/05/innodb-thread-concurrency for more details. Innodb_thread_concurrency works on linux. Thanks Alex On 8/29/07, Andrew Braithwaite [EMAIL PROTECTED] wrote:

Re: [MySQL] Fastest way to Search from a Table

2007-08-07 Thread Alex Arul Lurthu
On 8/7/07, Tharabar [EMAIL PROTECTED] wrote: SELECT `field1`,`field2`,`field3` FROM 'table' WHERE `field5` LIKE '%keyword%1' AND `field5` LIKE '%keyword2%' The most trivial way to speedup a query is to add an index on the columns that are being used in the where clause. But doing 'LIKE'

Re: MySQL database move

2007-07-09 Thread Alex Arul Lurthu
Hi Ace, If you cant affort downtime and if you are using innodb try removing auto extend on the current data file and create a datafile in a different partition and put autoextend on the same. If you are using MyISAM , you can move few tables to different disk use symlinks. -- Thanks Alex

Re: bin-log position.

2007-07-08 Thread Alex Arul Lurthu
Anand, If the dump was taken from the slave then the binlog positions that were dumped out are that of the slave. Now you might do 2 things : 1. Setup a slave of your master To do this use the binlog positions that you obtained using the command show slave status on your slave. The

Re: bin-log position.

2007-07-08 Thread Alex Arul Lurthu
. -- Thanks Alex http://blog.360.yahoo.com/alex.lurthu On 7/9/07, Ananda Kumar [EMAIL PROTECTED] wrote: Hi Alex, Thanks a lot, I missed on taking the exe_master_log position value. If i start from Read_Master_Log_Pos: 106683511, will it cause any harm. regards anandkl On 7/9/07, Alex Arul Lurthu

Re: Performance problem MySQL 4.0.20

2007-07-07 Thread Alex Arul Lurthu
On 7/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How does the cpu power influence the speed of a query? Sort is a cpu intensive process. *Check if you are suffering from locks on the tables you look up.* Also, was the table in the system where the queries are running faster rebuilt

Re: bin-log position.

2007-07-07 Thread Alex Arul Lurthu
On 7/6/07, Ananda Kumar [EMAIL PROTECTED] wrote: -- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.03', MASTER_LOG_POS=311; As see in the mysqldump is saying to start recovery from bin-log file ' mysql-bin.03' and position=MASTER_LOG_POS=311, You need to use the positions specified

Re: Performance problem MySQL 4.0.20

2007-07-07 Thread Alex Arul Lurthu
On 7/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How does the cpu power influence the speed of a query? Sort is a cpu intensive process. *Check if you are suffering from locks on the tables you look up.* Also, was the table in the system where the queries are running faster rebuilt

Re: mysqldump on slave.

2007-07-07 Thread Alex Arul Lurthu
You havent mentioned which version of mysql your are on. If on an older version i would recommend the option --opt. Also if you are running a dump using single-transaction option on a loaded system with writes, things might slow down significantly due to different versions of rows which the

Re: Cannot Connect: Can't create a new thread (errno 11)

2007-07-05 Thread Alex Arul Lurthu
Chris, Did you check if there are any user level MAX_USER_CONNECTIONS restriction set while granting access ? Thanks Alex On 7/4/07, Chris Faust [EMAIL PROTECTED] wrote: Folks, I'm wondering is someone could help us in trying to resolve the above error, we have read through what threads

Re: Performance problem MySQL 4.0.20

2007-07-05 Thread Alex Arul Lurthu
Hi, Run explain plan on both the machines and post the same. ~Alex On 7/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello Ananda, yes, the testmachine has the same data. Regards, Spiker -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose

Re: Blob data

2007-06-25 Thread Alex Arul Lurthu
Ratheesh, If you still want to place you blob data in the database, seperate out the blob storage to a seperate table. This will help you alleviate few of your performance and maintenance problems. ~Alex On 6/22/07, Steve Edberg [EMAIL PROTECTED] wrote: At 12:11 PM +0530 6/22/07, Ratheesh K

Re: replication

2007-05-15 Thread Alex Arul Lurthu
check if you are seeing any access denied errors in the mysql error log. ~Alex On 5/14/07, richard [EMAIL PROTECTED] wrote: Ian P. Christian wrote: richard wrote: as far as I can see, these commands select which db's to replicate on the slave that currently exist on the master server.

Re: Redo logs take to much disk space

2007-05-15 Thread Alex Arul Lurthu
the ask lies in expire_logs_days. If you set this to optimal number of days, logs older than the configured days will get purged. ~Alex On 5/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: One question about this, is it safe to turn of log_bin? i think, you can. the log is necessary for

Re: backup solution.

2007-05-15 Thread Alex Arul Lurthu
On 5/15/07, Ananda Kumar [EMAIL PROTECTED] wrote: Hi All, I have take a mysqldump of my entire database, is it possible to restore just one table from this mysqldump. Yes thats possible. cat your-dump-filename | grep tablename u want to restore mysql -u user -ppassword should do it.

Re: Memory Problems

2007-05-15 Thread Alex Arul Lurthu
On 5/15/07, Christoph Klünter [EMAIL PROTECTED] wrote: I have set the sort_buffer_size to 1G but even this doesn't help. Any hints ? Should we try a 64Bit-OS ? setting sort_buffer_size to 1GB is not recommended. it is a thread specific configuration parameter which means each thread will

Re: backup solution.

2007-05-15 Thread Alex Arul Lurthu
On 5/15/07, Ananda Kumar [EMAIL PROTECTED] wrote: Hi Alex, Thanks for the info, For the second question, do you mean i should restore the entire backup or just that one file from my backup. All the files should be from the same backup. AFAIK, MySQL doesnt have an option to recover only one

Re: Memory Problems

2007-05-15 Thread Alex Arul Lurthu
On 5/15/07, Micah Stevens [EMAIL PROTECTED] wrote: I think you may be able to get around this by using multiple key buffers? (MySQL 4.1 or later) key buffers caches only index data and they dont help with sorting like sort_buffer. they dont impact innodb engine. even while using multiple key

Re: replication

2007-05-14 Thread Alex Arul Lurthu
techincally yes you can have. replication is all about the queries that are getting executed on the master will be executed on the slave. So , if the database that exists on the master exists on the slave , then you should have no problems. Thanks Alex On 5/14/07, richard [EMAIL PROTECTED]

Re: Mysqldump Files

2007-01-30 Thread Alex Arul Lurthu
On a different note just running a slave will not help when there is some accidental deletion of data or tables or databases. Hence have a slave as Mikhail mentioned and also run regular backups on the slave. Preferably a tar of your mysql server after shutting it down, also ensure you have

Re: speeding up a join COUNT

2007-01-24 Thread Alex Arul
and also an index on users.entity_id (will help the join) should solve your problem. Thanks Alex On 1/24/07, Brent Baisley [EMAIL PROTECTED] wrote: You should create indexes on the fields you search on most. In this case, you are searching on the user_type field, so create an index on that

Re: Backup: Copy MYSQL Directory or use MysqlDump

2007-01-22 Thread Alex Arul
Hi, MySQL Dump is logical. Hence it is mostly slower than locking the MyISAM tables and copying them or shutting down the server and taring the entire MySQL directory if you are using innodb. If you are using innodb tables only you can run mysqldump with --single-transaction option to take a

Re: Urgent - MySQL 5 - mysqld using a lot of memory consistently

2007-01-22 Thread Alex Arul
ref: tallydb.TFMM.FLD_MSG_ID rows: 1 Extra: Using where - Original Message - *From:* Alex Arul [EMAIL PROTECTED] *To:* Ratheesh K J [EMAIL PROTECTED] *Sent:* Tuesday, January 23, 2007 11:57 AM *Subject:* Re: Urgent - MySQL 5 - mysqld using a lot

Re: Why would a SELECT COUNT(*)... WHERE... take way way longer than SELECT COUNT(primary_key)... WHERE... ?

2006-06-17 Thread Alex Arul
count(*) is slow in innodb due to Multi Versioning. Which table type are you using ? Thanx Alex On 6/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi everybody, MySQL 5.0.21 running on RedHat EL4, 2GHz CPU, 2,5GB RAM, RAID5/128MB RAM. At one point I had to issue the following query on a

Optimizing mysql client/server interactions

2006-05-02 Thread Alex Arul
Hi All, Our current setup has the mysql server and the client app run on the same host. We are using mysql++ (ports/mysql++-1.7.9) for the database client api. The application returns huge data sets in the order of 50K. When we do a show processlist most of the threads spend their time in

Re: Help with subqueries...

2006-04-28 Thread Alex Arul
On 4/28/06, Daevid Vincent [EMAIL PROTECTED] wrote: vmware reviewit # mysql --version mysql Ver 14.12 Distrib 5.0.19, for pc-linux-gnu (i686) using readline 5.1 Given two tables: CREATE TABLE `logs` ( `id` bigint(20) unsigned NOT NULL auto_increment, `user_id`

Re: Import .frm .myd .myi to Mysql

2006-04-19 Thread Alex Arul
HI, Take look at your my.cnf and obtain the location of your mysql data directory. Login into mysql create the database into which you want to import the tables. What this effectively does is create a directory under your mysql data directory. Now copy the .myd, .myi and .frm files to the