Re: Upgraded to 5.0.x from 4.1.x and ORDER BY sucks!

2007-05-21 Thread Sebastian Mendel
Gmail User schrieb: > I had perfectly working complex queries both with LEFT JOIN and without > and they were returning results in under a second. After upgrade to > 5.0.x, the same queries would return results in 20-30 second range. possible you had set up some query cache in 4, but not currently

Upgraded to 5.0.x from 4.1.x and ORDER BY sucks!

2007-05-21 Thread Gmail User
I had perfectly working complex queries both with LEFT JOIN and without and they were returning results in under a second. After upgrade to 5.0.x, the same queries would return results in 20-30 second range. Through trial and error, I discovered that in case of SELECT ... FROM table1, table2 ... O

Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
> Hm, I didn't know that! I thought it was only a special value to the > client tools, which I know will try to connect via socket on UNIX machines > when they see 'localhost' but will try to connect via TCP/IP when they see > '127.0.0.1'. Thanks for pointing this out! > > Baron In fact that was

Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
> Localhost is indeed a special value that isn't include in '%'. It's a > feature not a bug ;) > > Regards, Bingo! That was the point! If i connect to the server ip or server name it works perfectly, but if I try to connect to localhost it fails unless I add a new user specific to localhost :D

Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
> If you don't specify a hostname in SHOW GRANTS, '%' is assumed. My mistake > for not telling you this before. If you enable networking, and connect > with > > mysql -h 127.0.0.1 > > instead of > > mysql -h localhost Well, in fact 127.0.0.1 and localhost produce the same effect but

Re: speedup mysql restore

2007-05-21 Thread Eric Bergen
The best way to speed up restores is to not use mysqldump at all. Instead take a snapshot of the filesystem with something like mylvmbackup. Then restore is as fast as copying the files over. Also mysqldump adds disable keys and disable unique checks to the output by default when using the --opt

RE: string to timestamp conversion

2007-05-21 Thread Chris Boget
Take a look at the following: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#func tion_unix-timestamp That looks like exactly what you need... thnx, Chris -Original Message- From: Bryan Cantwell [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 4:45 PM To: MySQ

RE: string to timestamp conversion

2007-05-21 Thread Bryan Cantwell
I see no string to date function that does this conversion... -Original Message- From: Bryan Cantwell Sent: Monday, May 21, 2007 2:08 PM To: MySQL General Subject: string to timestamp conversion I have a table with a varchar column that contains a timestamp like this: 'Thu May 17 09:15

Re: string to timestamp conversion

2007-05-21 Thread seungp
Have you considered using the string to time function? Sent via BlackBerry from T-Mobile -Original Message- From: "Bryan Cantwell" <[EMAIL PROTECTED]> Date: Mon, 21 May 2007 12:08:11 To:"MySQL General" Subject: string to timestamp conversion I have a table with a varchar column that

string to timestamp conversion

2007-05-21 Thread Bryan Cantwell
I have a table with a varchar column that contains a timestamp like this: 'Thu May 17 09:15:47 2007' I need to grab this and include it in an insert sql that puts that value in a table as a timestamp... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

load control character....help

2007-05-21 Thread Ananda Kumar
Hi All, We are having some data load issues. We are moving data from oracle to mysql and in oracle we have some control characters like "U^?". Is it possible to load such data into mysql, if possible please give details. Please help. regards anandkl

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
Hi Baron, I will read about sql_mode. Also you scripting method sounds great. I will check on that. regards anandkl On 5/21/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Hi, You could change your server's SQL mode to be as restrictive as possible (STRICT_TRANS_TABLES, etc) so the scripts ca

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
Hi, You could change your server's SQL mode to be as restrictive as possible (STRICT_TRANS_TABLES, etc) so the scripts cause errors, instead of warnings. Read the MySQL manual section on SQL mode and decide which things you want to throw errors. Not all things can be changed to errors; you w

Re: need help...LOAD DATA INFILE

2007-05-21 Thread Ananda Kumar
Hi All, I was able to load data properly. We need to set the parameter set session collation_database=latin1_swedish_ci; set session character_set_database=latin1; please check this url for more info http://lists.mysql.com/commits/16915 On 5/19/07, Ananda Kumar <[EMAIL PROTECTED]> wrote: Hi

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
Hi Baron, I cannot do this, becuase the file would be given by engineers and to be applied on mysql and i need to inform them about any error after i apply them in mysql db. regards anandkl On 5/21/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Hi, I see now -- you want to see which commands

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
Hi, I see now -- you want to see which commands were executed from the file you sourced. As far as I know you cannot do this. You could add some debugging statements in the file, like SELECT 'about to drop the table'; Then in the output you will see this, and it may give you a hint as to wh

Re: spool command to file.

2007-05-21 Thread Ananda Kumar
Hi Baron, This will give only the results of the command. It does not include sql statement. I need the sql statement to know which sql errored out. Database changed +--+ | count(*) | +--+ |5 | +--+ 1 row in set (0.00 sec) On 5/21/07, Baron Schwartz <[EMAIL PROT

Re: spool command to file.

2007-05-21 Thread Baron Schwartz
Hi, Ananda Kumar wrote: Hi All, I am executing a script from mysql prompt as below mysql > source ddl.txt I want to spool the out put of the above command to a file along with the sql statments. Can you please let me know what parameter should i set for the this. Use the 'tee' command in th

spool command to file.

2007-05-21 Thread Ananda Kumar
Hi All, I am executing a script from mysql prompt as below mysql > source ddl.txt I want to spool the out put of the above command to a file along with the sql statments. Can you please let me know what parameter should i set for the this. regards anandkl

Re: show warnings.

2007-05-21 Thread Ananda Kumar
Hi Sebastian, Thanks a lot for the info. Also i am automating the "LOAD DATA LOCAL INFILE" script. Is it possible for me to show any error or spool the error to the file. My script take 4 input parameters a.login b.password. c.database d.hostname -e "load data local infile". How do spool any er

Re: show warnings.

2007-05-21 Thread Sebastian Mendel
Ananda Kumar schrieb: > When i do. > > show warnings > > It display only 64 rows, can i see all the 789 warning messages as show > above. http://dev.mysql.com/doc/refman/5.0/en/show-warnings.html "The maximum number of error, warning, and note messages to store is controlled by the max_error_c

Re: index number of a specific cell

2007-05-21 Thread Sebastian Mendel
sam rumaizan schrieb: > Is there a function in mysql to view the index number of a specific > cell/field? "index number" = primary key? i guess no > For example if I want the index number for info4 or info7. Is it possible? "index number" = row number? no - without an ORDER BY there is no

show warnings.

2007-05-21 Thread Ananda Kumar
Hi All, When i load data using "LOAD DATA LOCAL INFILE", it shows Query OK, 56678 rows affected, 789 warnings (4.47 sec) Records: 56678 Deleted: 0 Skipped: 0 Warnings: 789 When i do. show warnings It display only 64 rows, can i see all the 789 warning messages as show above. Please let me

index number of a specific cell

2007-05-21 Thread sam rumaizan
Is there a function in mysql to view the index number of a specific cell/field? For example if I want the index number for info4 or info7. Is it possible? Column 1 Column 2 Column 3 Column 4 Column 5 Info1 Info2

Re: Broken Tables, was:Memory Problems

2007-05-21 Thread Christoph Klünter
Mike, I had the same failures without network. And it is a onboard-controller :-) Christoph > > Christoph, > Have you tried replacing the network card with the one from the > working machine? Network cards can cause problems under high load but will > appear fine otherwise