MySQL and OpenMosix
Hello all, Does MySQL works well with OpenMosix? Has anyone ever tried it? Is there any special configuration to MySQL that I should be aware of? Thank you in advance, Carlos Fernando Scheidecker Antunes Linux User #207984 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to duplicate records
Hello all, I've got some records of a Database that I would like to duplicate if possible with an statement. The table has Code, Model, Year, units. The primary key is Code, Model and Year. What I need is to duplicate Code, Model and units for a different year. Say I want to duplicate all records which Code are N200 and N205 with the same model and same units but for year 2003. Is there any select and insert/replace statement to acomplish this? There are about 3.000 records and doing that manually is impossible. I am considering dump the whole file to a .csv and change year to 2003 and then reinsert it. Is there any way to do it in a smart way? Meaning an SQL statement. Thank you, Carlos Fernando. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: How to duplicate records
Don, Thank you very much. The only problem is that the primary index Code, Model and Year and what I need is to duplicate the Code, Model and Units for a different year, 2003, that does not exist. If I do the statement bellow it won't work. What I need is to insert Code, Model, Units for a specific code match but they have to be duplicated for year 2003. Thanks again, C.F. - Original Message - From: Don Vu [EMAIL PROTECTED] To: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED]; MySQL List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 9:38 AM Subject: RE: How to duplicate records mabye an insert into...select will work, something like: INSERT INTO new tablename SELECT Code, Model, Units from original table where Year=2003 and ((Code = 'N200') or (Code='N205')); http://www.mysql.com/doc/I/N/INSERT_SELECT.html -Don -Original Message- From: Carlos Fernando Scheidecker Antunes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:25 AM To: MySQL List Subject: How to duplicate records Importance: High Hello all, I've got some records of a Database that I would like to duplicate if possible with an statement. The table has Code, Model, Year, units. The primary key is Code, Model and Year. What I need is to duplicate Code, Model and units for a different year. Say I want to duplicate all records which Code are N200 and N205 with the same model and same units but for year 2003. Is there any select and insert/replace statement to acomplish this? There are about 3.000 records and doing that manually is impossible. I am considering dump the whole file to a .csv and change year to 2003 and then reinsert it. Is there any way to do it in a smart way? Meaning an SQL statement. Thank you, Carlos Fernando. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
TEXT field: How many characters does it hold
Hello All! Can anyone tell me how many characters a MySQL TEXT field can hold? What's the limit? Thank you, Carlos Fernando. Linux User #207984 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to update part of a field ?
Hello all, I've got some e-mails addresses on an e-mails database where one domain has been changed to another. So I have : email1@domain1 email2@domain1 I need to change @domain1 to @domain2 on this e-mail field and keep the user name. Some e-mails of an specific ISP had their domains changed but the usernames remained the same. So I need to update this table that has some hundreds addresses of this particular domain that had been changed. Is there any way to do it through a SQL statement? Thank you, Carlos Fernando. Linux User #207984 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Export just part of a table to a CSV file
Hello all, Usually I back-up my tables importing them to .csv files. What I do is I issue the following command : mysqldump - h localhost -u user -ppassword --tab=/tmp --fields-terminated-by=; database_name table_Name table.csv This creates a file called table.csv by dumping all the contents of table_Name of database_name database and separating their fields with a ;. What I would like to do is to do the same but with an SQL statement. Meaning, I would like to dump just part of the table through a SQL statement. Is there any way to do it? Thank you, Carlos Fernando. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
How to return the value of deleted rows
Hello Folks, I wonder how can I return the number of deleted rows after a DELETE SQL statement. Is there any way to return the quantity of updated rows as well? Thanks, C.F.
Performance Problems with Huge Table
I am having performance problems with my server with larger tables. I Have a 512MB Pentium III Red Hat Linux 7 server running MySQL version 3.23.32 packaged by Red Hat This server's /etc/my.cnf is as follows : [mysqld] pid-file=/var/run/mysqld/mysqld.pid datadir=/var/lib/mysql port=3306 socket=/var/lib/mysql/mysql.sock set-variable=max_connections=2000 skip-locking set-variable = key_buffer=384M set-variable = max_allowed_packet=1M set-variable = table_cache=512 set-variable = sort_buffer=2M set-variable = record_buffer=2M set-variable = thread_cache=8 set-variable = thread_concurrency=8 # Try number of CPU's*2 set-variable = myisam_sort_buffer_size=64M log-bin server-id = 1 [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid I have a table structure like this, including indexes : # Table structure for table 'tbl_Parts' # CREATE TABLE tbl_Parts ( Vendor varchar(30) NOT NULL default '', PartNumber varchar(20) NOT NULL default '', Suplier varchar(20) NOT NULL default '', Quantity int(11) default '0', Prico float default '0', Description varchar(50) NOT NULL default '', DateHour datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (Vendor,PartNumber,Suplier), KEY index_data(DateHour), KEY index_Company(Suplier,DateHour), KEY index_description(Description,Vendor), KEY index_Vendor(Vendor) ) TYPE=MyISAM; As you can see I have also an Index for the Vendor. The problem is that when I do an statement (that I use pretty much) : SELECT DISTINCT(Vendor) from tbl_Parts order by Vendor; It takes up to 52 seconds to return it since my table tbl_Parts has 1.130.300 records. This SQL statement is always ran with a PHP script so that the user can Select the vendor and type the PartNumber he/she is looking for. Based on my config, structure and situation, is there anyone who could kindly help me on boost its performance? 52 seconds to return the SELECT DISTINCT statement is very long. By the way, my system has an SCSI HD which is quite fast for it. Thank you all, Carlos Fernando Scheidecker Antunes.