ADDATE Question
Hi, I just tried this query SELECT ADDDATE('2008-01-02', 31); and MySQL returns 323030382d30322d3032, while it should be 2008-02-02 Is there something wrong? Willy Mularto F300HD+MR18DE (NLC1725)
Simple Query Question
Hi, Please help what is wrong with this simple query SELECT COUNT(key_agent) total FROM agents_consolidated WHERE total = 180 Thanks. Willy Mularto F300HD+MR18DE (NLC1725)
Re: Simple Query Question
Hi many thanks for the help :) On Apr 14, 2012, at 6:21 PM, Stefan Kuhn wrote: On Saturday 14 April 2012 09:51:11 Willy Mularto wrote: Hi, Please help what is wrong with this simple query SELECT COUNT(key_agent) total FROM agents_consolidated WHERE total = 180 Thanks. You need to use having instead of where, see the documentation. Stefan Willy Mularto F300HD+MR18DE (NLC1725) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql Willy Mularto F300HD+MR18DE (NLC1725) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Adding a column to a huge mysql table
duplicate the table structure, add the column to the new table, import the records into the table. this should be faster based on my experience and also will not disturb your transactions :) On Feb 17, 2012, at 8:21 AM, Angela liu wrote: Hi, Folk: I will need to add a column to a huge mysql table, this table is about 77GB, and has thousands of millions rows. any idea I can make this alter table faster? Thanks Angela Willy Mularto F300HD+MR18DE (NLC1725) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: case insensitivity
use LIKE On Jan 17, 2012, at 10:36 AM, Haluk Karamete wrote: How do I do case insensitive searches and replace operations? Is there an easy way to do this? Like some sort of a server level setting telling mySQL to ignore case for once and for all? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql Willy Mularto F300HD+MR18DE (NLC1725) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: access from everywhere but localhost?
Replace GRANT with REVOKE On Jun 20, 2011, at 8:08 PM, Matthias Leopold wrote: hi, this surely is a beginners question: i already created a user and privileges like this: GRANT ALL PRIVILEGES ON `xxx`.* TO 'yyy'@'%' identified by 'zzz'; how do i modify this setup to remove access from localhost/127.0.0.1? mysql version is 5.1.49 thx matthias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=sangpr...@gmail.com Willy Mularto F300HD+MR18DE (NLC1725) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: IN clause
Why not GROUP BY? On Jun 7, 2011, at 10:06 PM, joe j wrote: Dear all, I wish to create a new table from a table that has two columns country and person_name. Thus from the table below, I'd like to select all the records of those countries that have person names 'Tom' and 'Kevin'. country person name US Antony US Tom US Jack US Kevin China Kevin China Tom China Ann China Mike UK Kevin UK Mike UK Jack UK Beyer I want to have the following (the two countries that have person names Tom and Kevin): country person_name US Antony US Tom US Jack US Kevin China Kevin China Tom China Ann China Mike I tried the following but obviously that didn't work. CREATE TABLE `table_new` SELECT * FROM `table_old` WHERE (`person_name` ='Tom' AND `person_name` ='Kevin' ) AND ((table_old.country) IN (SELECT DISTINCT (table_old2.`country) FROM table_old AS table_old2)); I know I can do this by creating two additional tables, but was wondering if there was a direct way. Best, Joe. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=sangpr...@gmail.com Willy Mularto F300HD+MR18DE (NLC1725) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
memcached enabled
As per subject. How to setup MySQL memcached enabled? Willy Mularto F300HD+MR18DE -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Interrupt ALTER Process
Hi, I have an InnoDB with 12 millions of data. For some reason I need to alter the table structure by expanding the varchars value. It's been an hour and slow down the performance. Is it safe to kill the process? Thanks. Willy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Kill DELETE Query
Thanks for the confirmation. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ On Dec 17, 2010, at 1:31 PM, Ananda Kumar wrote: No...it will not. On Fri, Dec 17, 2010 at 11:26 AM, Willy Mularto sangpr...@gmail.com wrote: Thanks for the reply. I used non stored procedure approach. Another question is if I kill the process will it crash the table? Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ On Dec 17, 2010, at 12:06 PM, Ananda Kumar wrote: If u have used a stored proc to delete the rows, and commting freqently, then the kill will happen faster. If you have just used delete from table_name where condition, then it would take toot much time to rollback all the deleted but not commited rows. Regards anandkl On Fri, Dec 17, 2010 at 8:37 AM, Willy Mularto sangpr...@gmail.com wrote: Hi List, I run a delete query to delete around 1 million rows in innodb table, It's been hours and still unfinish. Is it safe to kill that delete query process while the table is also inserting and updating other rows? Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=anan...@gmail.com
Kill DELETE Query
Hi List, I run a delete query to delete around 1 million rows in innodb table, It's been hours and still unfinish. Is it safe to kill that delete query process while the table is also inserting and updating other rows? Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Kill DELETE Query
Thanks for the reply. I used non stored procedure approach. Another question is if I kill the process will it crash the table? Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ On Dec 17, 2010, at 12:06 PM, Ananda Kumar wrote: If u have used a stored proc to delete the rows, and commting freqently, then the kill will happen faster. If you have just used delete from table_name where condition, then it would take toot much time to rollback all the deleted but not commited rows. Regards anandkl On Fri, Dec 17, 2010 at 8:37 AM, Willy Mularto sangpr...@gmail.com wrote: Hi List, I run a delete query to delete around 1 million rows in innodb table, It's been hours and still unfinish. Is it safe to kill that delete query process while the table is also inserting and updating other rows? Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=anan...@gmail.com
WTA Increasing InnoDB Speed
Dear List, I have MySQL 5.14 installed on Dell R710 32GB RAM 600GB SAS HDD with Ubuntu 10.04 64 Bit. I deploy InnoDB as my default engine. The server is a high load server. On a fresh install and empty table it can insert around 5 millions new records per day average. But when the table getting fat the performance starting to drop around 5% per day. It forces me to re create an empty table each month. So how to keep my server has a stable performance? Many thanks for the tips. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
InnoDB Crash
Hi List, Last night accidentally one of my InnoDB table crash. And cause client can not connect to MySQL, it always said cannot connect to socket, even the daemon is launched. I tried to set innodb_force_recovery from 0 to 6 and only number 3 bring back the connection. After that I dump the data and drop the table. I recreate it as MyISAM and inject the dumped data. After that I stop MySQL and remove innodb_force_recovery and restart. And clients start complaining can not connect. Then I enable innodb_force_recovery again. I tried to create a new InnoDB table test and MySQL complaint cannot create the table due to the engine type is not supported. The question is how to solve this problem? How to bring back InnoDB to my server without reinstall the OS or MySQL itself? I have also tried to drop the database and remove the data folder from mysql data dir and recreate the database but still no luck. Thanks for any help. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: InnoDB Crash
I got the solution. I stop the ib* files in MySQL datadir and start the server. Now everything is back to normal. Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ On Oct 12, 2010, at 11:00 PM, Suresh Kuna wrote: Hey Willy - Install the new binaries and start mysql with new binary as basedir and see whether innodb has enabled or not. Check the error log why the innodb is getting disabled, make a copy of it here too. On Tue, Oct 12, 2010 at 2:57 PM, Willy Mularto sangpr...@gmail.com wrote: Hi List, Last night accidentally one of my InnoDB table crash. And cause client can not connect to MySQL, it always said cannot connect to socket, even the daemon is launched. I tried to set innodb_force_recovery from 0 to 6 and only number 3 bring back the connection. After that I dump the data and drop the table. I recreate it as MyISAM and inject the dumped data. After that I stop MySQL and remove innodb_force_recovery and restart. And clients start complaining can not connect. Then I enable innodb_force_recovery again. I tried to create a new InnoDB table test and MySQL complaint cannot create the table due to the engine type is not supported. The question is how to solve this problem? How to bring back InnoDB to my server without reinstall the OS or MySQL itself? I have also tried to drop the database and remove the data folder from mysql data dir and recreate the database but still no luck. Thanks for any help. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=sureshkumar...@gmail.com -- Thanks Suresh Kuna MySQL DBA
Kill All Proccesses
Hi, I see so many locked tables and can not be unlocked. Is there any single command or tools to kill all processes? sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Kill All Proccesses
AFAIK mysqladmin just kill a proccess and can not do kill all instances. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ On Sep 29, 2010, at 9:09 PM, Евгений Килимчук wrote: mysqladmin kill id,id,... 2010/9/29 Willy Mularto sangpr...@gmail.com Hi, I see so many locked tables and can not be unlocked. Is there any single command or tools to kill all processes? sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=ekilimc...@gmail.com -- Best regards, Eugene Kilimchuk ekilimc...@gmail.com
Update Table
Hi, I work on MySQL 5 with PHP 5 and use Apache 2 as the webserver. I have a simple query that searches matched row id and update the field via HTTP GET query. On a low load it succeed update the row. But on high traffic sometimes it failed to update some rows. No errors return by the script. What usually cause this and how to solve this problem? Thanks sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Persistent Connection VS One Time Connection Was Update Table
I have checked Apache's log. There is no refused connection. And also with MySQL I have set it to 999 connections and view the processes. Maximum connection ever reached was only around 200. What I'm thinking now is. Is it because of I use one time connection method? I mean every time the script's called I create new connection and disconnect it after execute the query. Thanks sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ On Sep 27, 2010, at 7:28 PM, Nigel Wood wrote: On Mon, 2010-09-27 at 11:25 +0100, Willy Mularto wrote: Hi, I work on MySQL 5 with PHP 5 and use Apache 2 as the webserver. I have a simple query that searches matched row id and update the field via HTTP GET query. On a low load it succeed update the row. But on high traffic sometimes it failed to update some rows. No errors return by the script. What usually cause this and how to solve this problem? Thanks 1.) Are you sure the script is executed under those conditions? Is Apache refusing the request because to many children have been forked? 2.) Are you sure the script will report if MySQL fails with too many connections? sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
InnoDB Buffer Pool Status
Hi, I got this result on InnoDB Buffer Pool Status: Free pages 1 Dirty pages 2,040 Pages containing data 31,359 Pages to be flushed 457,083,205 Busy pages 1,408 Read requests 31,348,288,497 Write requests 7,913,407,934 Read misses 39,736,110 Write waits 0 Read misses in %0.13 % Write waits in %0.00 % I see there are millions of Read misses. What's that mean? And how to tuning up my server to get faster, stable, and reliable? Many thanks for any response. sangprabv sangpr...@gmail.com http://www.petitiononline.com/froyo/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
High Overhead On Active Insert And Delete Table
Hi list, I have a table which is very active in operation INSERT INTO and DELETE, approximately there will be around 2millions INSERT and DELETE operation per day. And I see the overhead is getting very high, I must do OPTIMIZE TABLE query every time. Is there any other option to solve this? TIA. Willy sangpr...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: High Overhead On Active Insert And Delete Table
The engine is using MyISAM. And here is the structure: CREATE TABLE IF NOT EXISTS `ie_push` ( `sql_id` bigint(20) NOT NULL auto_increment, `momt` enum('MO','MT','DLR') default NULL, `sender` varchar(20) default NULL, `receiver` varchar(20) default NULL, `udhdata` blob, `msgdata` text, `time` bigint(20) default NULL, `smsc_id` varchar(255) default NULL, `service` varchar(255) default NULL, `account` varchar(255) default NULL, `id` bigint(20) default NULL, `sms_type` bigint(20) default NULL, `mclass` bigint(20) default NULL, `mwi` bigint(20) default NULL, `coding` bigint(20) default NULL, `compress` bigint(20) default NULL, `validity` bigint(20) default NULL, `deferred` bigint(20) default NULL, `dlr_mask` bigint(20) default NULL, `dlr_url` varchar(255) default NULL, `pid` bigint(20) default NULL, `alt_dcs` bigint(20) default NULL, `rpi` bigint(20) default NULL, `charset` varchar(255) default NULL, `boxc_id` varchar(255) default NULL, `binfo` varchar(255) default NULL, `priority` tinyint(4) default NULL, `custom` varchar(255) default NULL, `additional` varchar(255) default NULL, `service_id` varchar(50) default NULL, `fid` varchar(50) default NULL, `msgid` varchar(50) default NULL, `insertdate` datetime default NULL, PRIMARY KEY (`sql_id`), KEY `momt` (`momt`), KEY `sender` (`sender`), KEY `receiver` (`receiver`), KEY `time` (`time`), KEY `service` (`service`), KEY `account` (`account`), KEY `id` (`id`), KEY `sms_type` (`sms_type`), KEY `mclass` (`mclass`), KEY `mwi` (`mwi`), KEY `coding` (`coding`), KEY `compress` (`compress`), KEY `validity` (`validity`), KEY `deferred` (`deferred`), KEY `dlr_mask` (`dlr_mask`), KEY `dlr_url` (`dlr_url`), KEY `pid` (`pid`), KEY `rpi` (`rpi`), KEY `alt_dcs` (`alt_dcs`), KEY `charset` (`charset`), KEY `boxc_id` (`boxc_id`), KEY `binfo` (`binfo`), KEY `priority` (`priority`), KEY `custom` (`custom`), KEY `additional` (`additional`), KEY `service_id` (`service_id`), KEY `insertdate` (`insertdate`), KEY `fid` (`fid`), KEY `msgid` (`msgid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Willy sangpr...@gmail.com On Jan 3, 2010, at 6:00 PM, sureshkumar...@gmail.com wrote: Hi Willy, What is the engine you are using for the table? Paste the table structure. Thanks, Suresh Kuna --Original Message-- From: Willy Mularto To: mysql@lists.mysql.com Subject: High Overhead On Active Insert And Delete Table Sent: Jan 3, 2010 4:22 PM Hi list, I have a table which is very active in operation INSERT INTO and DELETE, approximately there will be around 2millions INSERT and DELETE operation per day. And I see the overhead is getting very high, I must do OPTIMIZE TABLE query every time. Is there any other option to solve this? TIA. Willy sangpr...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=sureshkumar...@gmail.com Sent from BlackBerry® on Airtel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org