Re: Fail to change MySQL data directory on ubuntu

2009-08-25 Thread Jia Chen
I run sudo /etc/init.d/mysql start and check the syslog by running sudo tail -f /var/log/syslog This is what I get Aug 25 22:18:06 chenj-desktop mysqld_safe[10934]: started Aug 25 22:18:06 chenj-desktop kernel: [11083.933531] type=1503 audit(1251253086.020:43): operation="inode_create" requeste

Re: Fail to change MySQL data directory on ubuntu

2009-08-26 Thread Jia Chen
hine. I had to change the object type of the new data dir to mysqld-something. I'm on a mobile phone and can't remember the exact cmd. On Tuesday, August 25, 2009, Jia Chen mailto:chen.1...@gmail.com>> wrote: > I run sudo /etc/init.d/mysql start and check the syslog

Re: Fail to change MySQL data directory on ubuntu

2009-08-27 Thread Jia Chen
> Chen, Did you really delete ibdata1 ? Yes, I did. Best, Jia Claudio Nanni wrote: 2009/8/26 chen jia mailto:chen.1...@gmail.com>> Hi there, I am using MySQL on ubuntu 8.04. I followed this link http://www.ubuntu-howto.info/howto/how-to-move-mysql-databases-to-another-lo

Re: Fail to change MySQL data directory on ubuntu

2009-08-27 Thread Jia Chen
files with the rest of the datadir. The ibdata1 file contains innodb's system tables and depending on your setting of innodb_file_per_table it also contains your data! On Thu, Aug 27, 2009 at 7:56 AM, Jia Chen wrote: Chen, Did you really delete ibdata1 ? Yes, I did. Best, Jia Cl

Very Slow Query

2009-08-28 Thread Jia Chen
Hi all, One seemingly simple query that joins two tables takes a long time for me. This is my library. mysql> show table status from nber1999; +---++-++--++-+--+--+---++--

Re: Very Slow Query

2009-08-28 Thread Jia Chen
--+ 2 rows in set, 1 warning (0.00 sec) Best, Jia Dan Nelson wrote: In the last episode (Aug 28), Jia Chen said: One seemingly simple query that joins two tables takes a long time for me. This is my library. mysql> show table stat

Re: Very Slow Query

2009-08-28 Thread Jia Chen
Hi Dan and John, Thanks for your time! You guys are right. I did not index any columns when I created these tables. After I indexed assignee columns in both tables, the select clause runs in seconds. Best, Jia Dan Nelson wrote: In the last episode (Aug 28), Jia Chen said: Thanks for

How to optimize a slow query?

2009-09-05 Thread Jia Chen
Hi there, One simple query took more than 10 minutes. Here is how relevant rows in the slow query log looks like: # Time: 090905 10:49:57 # u...@host: root[root] @ localhost [] # Query_time: 649 Lock_time: 0 Rows_sent: 0 Rows_examined: 26758561 use world; create table rmpdata1 select ri.*,

Re: How to optimize a slow query?

2009-09-06 Thread Jia Chen
f that makes a speed difference. For example, if you are using BTREE then switch to HASH or vice versa. See http://dev.mysql.com/doc/refman/5.0/en/create-index.html for more info. Mike At 10:05 AM 9/5/2009, Jia Chen wrote: Hi there, One simple query took more than 10 minutes. Here is how

Re: How to optimize a slow query?

2009-09-06 Thread Jia Chen
ead you eliminate the query altogether by keeping the data of the 2 tables into 1 table in the first place. Mike At 09:45 AM 9/6/2009, Jia Chen wrote: Thanks for your reply, Mike. Yes, 13419851 rows were added to rmpdata1. However, 10 minutes seem to be too long. I run the same join by

Re: How to optimize a slow query?

2009-09-07 Thread Jia Chen
duplicate columns. The Insert statement will insert rows from mv that are missing in ri. Mike At 01:51 PM 9/6/2009, Jia Chen wrote: Hi Mike, Thanks for your detailed answer. Now, I understand what you mean. And, yes, I agree with you that keeping all data in one table works better for a bunch of 1

How to remove stagnant stock returns?

2009-09-08 Thread Jia Chen
Here there, One of my tables, called mr, looks like this, codendate mr 130042199402 0.96 130042199403 0.97 130042199404 0.95 130042199405 1 130042199406 1.1 130042199407 1 130042199408 1 130042199409 1 130043199205