Index Query Tunning

2014-01-29 Thread Anupam Karmarkar
Hi All, I have situation here about Innodb locking. In  transaction, We select from XYZ transaction table values and then updates it like below SESSION 1: START TRANSACTION; SELECT ID INTO vID FROM XYZ WHERE FLAG = 1 ORDER BY TIME LIMIT 1 FOR UPDATE; UPDATE XYZ SET FLAG=0 WHERE ID = vID;

Index locking Query

2014-01-17 Thread Anupam Karmarkar
Hi All, I have situation here about Innodb locking. In  transaction, We select from XYZ transaction table values and then updates it like below SESSION 1: START TRANSACTION; SELECT ID INTO vID FROM XYZ WHERE FLAG = 1 ORDER BY TIME LIMIT 1 FOR UPDATE; UPDATE XYZ SET FLAG=0 WHERE ID = vID;

Re: Monitoring Sessions

2012-10-10 Thread Anupam Karmarkar
Thanks Johan for info, We already tried with tcpdump and wireshark it was helpfull. Percona tool kit i need to try. From: Johan De Meersman vegiv...@tuxera.be To: Anupam Karmarkar sb_akarmar...@yahoo.com Cc: mysql@lists.mysql.com Sent: Wednesday, 10 October

Monitoring Sessions

2012-10-09 Thread Anupam Karmarkar
Hi All, How to monitor individual session number of rows selected or updated by sessions, number of bytes sent and reviewed by session in a given time period, sessions connects runs command and then disconnects, SHOW GLOBAL STATUS is not helping me in this case as i want low level session

Re: Need Query Help

2012-06-21 Thread Anupam Karmarkar
Thanks Rick for your reply, Here i am asking about logic to perpare query or whole query itself. --Anupam From: Rick James rja...@yahoo-inc.com To: Anupam Karmarkar sb_akarmar...@yahoo.com; mysql@lists.mysql.com mysql@lists.mysql.com Sent: Wednesday, 20

Need Query Help

2012-06-20 Thread Anupam Karmarkar
Hi All, I need query help for following table struture, where we need to calculate login duration of that employee for give period. Example table EmployeeID     LoginTime   LogoutTIme 101            2012-05-01 10:00:00     2012-05-01 12:30:00 102           

Architectural Help

2012-05-24 Thread Anupam Karmarkar
Hi All, I need architectural help for our requirement, We have nearly 50 data centre through out different cities from these data center application connect to central database server currently, there are conectivity and nework flcutions issues for different data center, so we comeup with

Re: Architectural Help

2012-05-24 Thread Anupam Karmarkar
Dear Nigel, Thank for reply.. See my comments below --Anupam From: Nigel Wood nw...@plus.net To: Anupam Karmarkar sb_akarmar...@yahoo.com; mysql@lists.mysql.com mysql@lists.mysql.com Sent: Thursday, 24 May 2012 3:35 PM Subject: RE: Architectural Help

Re: replication between two tables in same database

2011-10-03 Thread Anupam Karmarkar
Try out functionality you desire with trigger to replicate data From: Derek Downey de...@orange-pants.com To: [MySQL] mysql@lists.mysql.com Sent: Thursday, 29 September 2011 10:46 PM Subject: Re: replication between two tables in same database You could look

Re: Join 2 tables and compare then calculate something

2011-10-03 Thread Anupam Karmarkar
Try out query with UNION also select A,B,C from (select A,B,C from X UNION select A,B,C from Y) group by A,B,C having count(*)1 From: Gian Karlo C webdev...@gmail.com To: mysql@lists.mysql.com Sent: Sunday, 2 October 2011 12:49 PM Subject: Join 2 tables and

Schema list

2011-07-27 Thread Anupam Karmarkar
There is one database name 'XYZ' on linux system, some one has mistakenly created new database name with 'xYZ', database is created when I use 'xYZ' database, there are no tables with SHOW TABLES, but when i run SHOW PROCEDURE STATUS it show procedures from 'XYZ' database. My concern is that

Replication Sync Error

2011-06-23 Thread Anupam Karmarkar
Hi All, We are running semi-sync replication on production server, last week found out that replication suck at some event schedule created at master, as that was not important i skipped that started replication again, found out that slave is days behind at master, i invested gate more and

Re: Fastest Select

2011-06-08 Thread Anupam Karmarkar
, Johan De Meersman vegiv...@tuxera.be wrote: From: Johan De Meersman vegiv...@tuxera.be Subject: Re: Fastest Select To: Claudio Nanni claudio.na...@gmail.com Cc: mysql@lists.mysql.com, Anupam Karmarkar sb_akarmar...@yahoo.com Date: Wednesday, 8 June, 2011, 10:53 AM - Original Message

Fastest Select

2011-06-07 Thread Anupam Karmarkar
Hi All, We have very big table with few column contains nearly 10 million records, We need to tune this table for simple select statement where we check record exists in table or not and  requirement is response time should be less than 10 million second for nearly 1000 concurrent requests,

RE: Complex Query

2011-05-20 Thread Anupam Karmarkar
Hi Guido, You need to add group by in your query get desire result SELECT IFNULL(image,'no_image.jpg') as image,title, subtitle, group_concat(concat(fname,' ',initial,' ',lname)) as author, pkisbn, publisher FROM book INNER JOIN publisher on pkpublisher_id = fkpublisher_id INNER JOIN

Re: Help with a query

2011-05-20 Thread Anupam Karmarkar
Hi Aveek, You need to use something like union all and having to get desire result Follow example below select file, digest  from ( SELECT file, digest,Count(*)  as Cnt FROM A GROUP BY file, digest union all SELECT file, digest,Count(*)  as Cnt FROM B GROUP BY file, digest ) tmp group by

Re: innodb system variable

2011-03-29 Thread Anupam Karmarkar
Hi All innodb_rollback_on_timeout=1 Specifies when there is transaction open by session and not committed, If such session is inactive for long time, MySQL by default kicks out such session and transaction perform by session would be rollback innodb_lock_wait_timeout=600 Specify wait for