Re: How to delete all rows....

2006-09-26 Thread Chris
mos wrote: At 08:41 PM 9/25/2006, you wrote: Dilipkumar wrote: Hi, Its delete * from table will only do if you go for a truncate it will recreate the table structure ? It's better to use delete. Can you explain why? I'd go for instant truncate rather than waiting around for delete to

Best MySQL configuation

2006-09-26 Thread Sayed Hadi Rastgou Haghi
Dear All, What is the best configuration for a server with 2 XEON dual core CPU and 4GB Ram and 200GB RAID 5 hard? -- Sincerely, Hadi Rastgou A Google Account is the key that unlocks the world of Google. a href= http://www.spreadfirefox.com/?q=affiliatesamp;id=0amp;t=1; Get FireFox! /a

Re: Best MySQL configuation

2006-09-26 Thread Jangita @ FSA
Is it dedicated to mysql only? what operating system does it run? Sayed Hadi Rastgou Haghi wrote: Dear All, What is the best configuration for a server with 2 XEON dual core CPU and 4GB Ram and 200GB RAID 5 hard? -- PO Box 26453 00504 Nairobi, Kenya. TEL: +254722996532 [EMAIL PROTECTED] --

Requesting help with subquery

2006-09-26 Thread Zembower, Kevin
I'm trying to use a subquery for the first time, and am having some problems. I'm hoping someone can give me some suggestions on ways of doing what I want, and further suggestions if there's a better way of going about my task. I have a database of publications in different languages. main

Re: Requesting help with subquery

2006-09-26 Thread Johan Höök
Hi Kevin, I didn't look that close at it but it should be IFNULL, not ISNULL which is SQLserver's version of it. /Johan Zembower, Kevin skrev: I'm trying to use a subquery for the first time, and am having some problems. I'm hoping someone can give me some suggestions on ways of doing what I

Re: Mysql and Perl

2006-09-26 Thread Jørn Dahl-Stamnes
On Monday 25 September 2006 20:05, you wrote: there are two pieces -- dbi, and dbd::mysql. you installed the former but not the latter. go to:   http://cpan.perl.org and search for mysql ... Found it, but it won't install: # perl Makefile.PL I will use the following settings for

Re: Help with query

2006-09-26 Thread Visolve DB Team
Hi, Try with FULLTEXT search. Alter the table to make the search columns as FULLTEXT columns, with MyISAM engine and retrieve the records using MATCH keyword. Ref:http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html Thanks, ViSolve DB Team. - Original Message - From: Ed

Langsames Insert, Optimierung

2006-09-26 Thread malinux
Hallo Group, ich lese im Moment ein XML aus und möchte es in eine Datenbank schreiben. Nun folgendes, ich lese und generiere die Inserts via PHP, und füge diese in ein Array ein. Nachdem das Auslesen fertig ist will ich das Array in die Datenbank schreiben: CREATE TABLE `result` ( `uID`

odd behaviour with auto_increment

2006-09-26 Thread Jorrit Kronjee
Dear list, I discovered something that seems to be odd behaviour. I have a basic table with one column set to auto_increment: mysql DESCRIBE basic_table; +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra

Hanging batched statement

2006-09-26 Thread Andreas Schlicker
Hi all, I have a Java application that fills a MyISAM table with a batched statement. Sometimes the statement does not stop, and it is not possible to kill the statement. Killing the application does not work, and also killing the statement with MySQL-Administrator does not help. The only

Help for query

2006-09-26 Thread Xiaobo Chen
Hi, all The version of Mysql is 4.0.15 on Solaris 9. I am in such a situation. There are 2 tables something like these: Table A: -- location|timestamp | other fields --- Table B location|timestamp |

Re: Langsames Insert, Optimierung

2006-09-26 Thread Dominik Klein
Diese Zeit muss verringert werden ~ 3 Sekunden wären noch akzeptabel. Idee o. MySQL Optimierungen? Du kannst versuchen, alle Zeilen in einem Statement einzufügen. also so etwa: insert into test values (1),(2),(3),...,(n); -- MySQL General Mailing List For list archives:

Re: Updating two fields from an aggregate query

2006-09-26 Thread Dan Buettner
Robert, you might give insert ... select ... on duplicate key update a try: http://dev.mysql.com/doc/refman/5.0/en/insert-select.html something like this (untested): INSERT INTO parent (id, maxChildAge, childCount) SELECT parentid, MAX(age) as maxAge, COUNT(*) as ct FROM child WHERE parentid IN

RE: Help for query

2006-09-26 Thread Xiaobo Chen
Yes, you're right, Jerry. Thing is that I can NOT use 'min_t' in 2) query, but have to plug in the actual value from 1) query. This isn't what I want. If I tried this: 1) create temporary table tbl_min as (select min(abs(Ta - timestamp)) as min_t from B; so tbl_min is like: min_t |

Updating two fields from an aggregate query

2006-09-26 Thread Robert DiFalco
I have two tables that are related: Parent LONG id LONG childCount LONG maxChildAge ... Child LONG parentId LONG age ... There can be thousands of parents and millions of children, that is why I have denormalized childCount and maxChildAge. The values are too expensive to

Re: Langsames Insert, Optimierung

2006-09-26 Thread malinux
Hallo, das hat schon geholfen, mir war bis dato noch nicht bewusst gewesen dass die Unterschiede so gewaltig sind. Gibts noch andere Möglichkeiten. - Vom Scripting her ist das nicht unbedingt optimal - Wie viele Zeilen können es maximal sein o. sollten es sein? MfG Zitat von Dominik Klein [EMAIL

Re: odd behaviour with auto_increment

2006-09-26 Thread Dan Buettner
Jorrit, it's a known behavior, not a bug. Recent versions of MySQL will, when given a zero (0) as a value for an auto incrementing identity column, simply fill in the next auto incrementing value ... unless you flip a switch to specifically tell it not to do that ... see:

Re: Help for query

2006-09-26 Thread Xiaobo Chen
I found if I divided into 2 steps, I will find the record in table B: Ta - the given timestamp from table A; 1) select min(abs(Ta - timestamp)) as min_t from B; 2) select * from B where (timestamp + min_t = Ta) or (timestamp - min_t = Ta); But, how can I make these 2 steps into 1 query?

RE: Help for query

2006-09-26 Thread Jerry Schwartz
Your first query returns a scalar (single value), right? You can put its value into a variable, and use that in the second query. It's not exactly what you wanted, but it will work without external programming. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave.

Re: RE: Updating two fields from an aggregate query

2006-09-26 Thread Dan Buettner
I'd expect it to be quicker, especially in your situation where you are updating potentially hundreds of records at a time. If you have 250 records to update, today you're performing 500 queries - first a select and then an update for each parentid. This is one query for all 250 records. I

Strange insert: ERROR 1172 (42000)

2006-09-26 Thread Wai-Sun Chia
This is so weird! I'm getting a: ERROR 1172 (42000): Result consisted of more than one row I've setup 2 machines. Same table (dbsetup.sql) , same insert statement (foo.sql), same version (5.0.24a). Only difference is: One is my laptop on FC5-i386, the other is a server on RHEL4u4-i386 Any

RE: Updating two fields from an aggregate query

2006-09-26 Thread Robert DiFalco
Hdo you think this would perform better than simply using the two queries? I wonder if the overhead associated with the ON DUPLICATE KEY exception and handler might not outweigh the benefits of a single query. -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent:

Re: Requesting help with subquery

2006-09-26 Thread Chris Sansom
At 11:40 -0400 26/9/06, Zembower, Kevin wrote: IF(ISNULL(SELECT lv.langversionid FROM langversion AS lv JOIN baseitem AS b3 ON lv.baseitemid = b3.baseitemid WHERE lv.langid = 1 AND b.baseitemid =

RE: Requesting help with subquery

2006-09-26 Thread Zembower, Kevin
Thank you, Johan and Chris, for finding my obvious mistakes. Unfortunately, even after fixing them, I still get an SQL error: [EMAIL PROTECTED]:~$ cat OrderDB-requested.sql SELECT m.title AS Main Category, s.title AS Sub Category, b.partno AS Part Number, (SELECT lv.title

Partition Help

2006-09-26 Thread Michael Gargiullo
I'm working on a project in which we'd like to convert from Oracle to MySQL. We need to partition our data for speed concerns. Currently in Oracle I create 8, 3 hour partitions for each day (Currently running 450M -750M rec inserts/day). I was looking for matching functionality in MySQL, but it

Re: Partition Help

2006-09-26 Thread mos
At 02:03 PM 9/26/2006, you wrote: I'm working on a project in which we'd like to convert from Oracle to MySQL. We need to partition our data for speed concerns. Currently in Oracle I create 8, 3 hour partitions for each day (Currently running 450M -750M rec inserts/day). I was looking for

RE: Partition Help

2006-09-26 Thread Michael Gargiullo
-Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 26, 2006 3:40 PM To: mysql@lists.mysql.com Subject: Re: Partition Help At 02:03 PM 9/26/2006, you wrote: I'm working on a project in which we'd like to convert from Oracle to MySQL. We need to partition our

RE: Partition Help

2006-09-26 Thread mos
At 02:53 PM 9/26/2006, Michael Gargiullo wrote: -Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 26, 2006 3:40 PM To: mysql@lists.mysql.com Subject: Re: Partition Help At 02:03 PM 9/26/2006, you wrote: I'm working on a project in which we'd like to

RE: Partition Help

2006-09-26 Thread Michael Gargiullo
Mike We're using the Load infile function to load the data generated by another process. We do not do updates, but occasionally need to either walk the table or run a query against it. On Oracle, we currently need 3 hour partitions to keep the 5 indexes timely. This system handles 450-750

RE: Partition Help

2006-09-26 Thread mos
At 03:37 PM 9/26/2006, you wrote: Mike We're using the Load infile function to load the data generated by another process. We do not do updates, but occasionally need to either walk the table or run a query against it. On Oracle, we currently need 3 hour partitions to keep the 5 indexes

RE: Partition Help

2006-09-26 Thread Michael Gargiullo
-Original Message- From: mos [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 26, 2006 5:27 PM To: mysql@lists.mysql.com Subject: RE: Partition Help At 03:37 PM 9/26/2006, you wrote: Mike We're using the Load infile function to load the data generated by another process. We

Error 1064 when importing 4.0 dump into 4.1 via command line

2006-09-26 Thread Curious George
I dumped a database from a 4.0 mysql and am attempting to move it to a server running 4.1 - using the command line: $ mysql -u root -pmypassword empty4.1db 4.0dump.sql The result: ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Re: Error 1064 when importing 4.0 dump into 4.1 via command line

2006-09-26 Thread Carlos Proal
I dont think that is the problem but, what do you mean by a slow connection ?, you cant run the dos2unix command on the remote server ? The error ocurred on line 2, did you see any special word in that line ? can you share with us that line? , remember that each version may can reserve different

transitioning from ms sql

2006-09-26 Thread Arjun Bhandari
Hi, I have been using MS SQL for the last one year, however would not like to transition to mysql. At the first glance it looks very different from ms sql and the tools are also different. can someone tell me if there is any document which explains the equivalence and how i could port a lot of

Re: transitioning from ms sql

2006-09-26 Thread Wai-Sun Chia
On 9/27/06, Arjun Bhandari [EMAIL PROTECTED] wrote: Hi, I have been using MS SQL for the last one year, however would not like to Huh? If you would NOT like to transition to MySQL, then why are you asking all these stuff? -- MySQL General Mailing List For list archives:

RE: transitioning from ms sql

2006-09-26 Thread Quentin Bennett
Hi, There is a white paper on that cery subject available at http://www.mysql.com/why-mysql/white-papers/mysql_wp_mssql2mysql.php -Original Message- From: Arjun Bhandari [mailto:[EMAIL PROTECTED] Sent: Wednesday, 27 September 2006 4:11 p.m. To: mysql@lists.mysql.com Subject: