Re: [question]any performance tools about UPDATE

2011-09-23 Thread Prabhat Kumar
I don't think any other than show full processlist. In which state query is locked or not. I/O related things you check at OS level. On Thu, Sep 22, 2011 at 11:07 PM, jiangwen jiang jiangwen...@gmail.comwrote: Hi, Is there any performance toolds about UPDATE/INSERT querys? I want

Re: Update on inner join - looks good to me, where did I go wrong?

2011-09-10 Thread Dotan Cohen
On Sat, Sep 10, 2011 at 01:48, Carsten Pedersen cars...@bitbybit.dk wrote: `userTable.userid` = `userTable`.`userid` Thank you Carsten. That was indeed the problem! Have a peaceful weekend. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- MySQL General Mailing List For list

Fwd: strange mysql update ..

2011-09-09 Thread umapathi b
Any update from anybody ? -- Forwarded message -- From: umapathi b umapath...@gmail.com Date: Thu, Sep 8, 2011 at 4:28 AM Subject: Re: strange mysql update .. To: Ananda Kumar anan...@gmail.com Cc: mysql@lists.mysql.com Here is the o/p after the update .. user_id

Re: strange mysql update ..

2011-09-09 Thread Derek Downey
Try searching for a row that has a login_date of '-00-00 00:00:00' - Derek On Sep 9, 2011, at 8:52 AM, umapathi b wrote: Any update from anybody ? -- Forwarded message -- From: umapathi b umapath...@gmail.com Date: Thu, Sep 8, 2011 at 4:28 AM Subject: Re: strange

Update on inner join - looks good to me, where did I go wrong?

2011-09-09 Thread Dotan Cohen
I'm trying to update on an join, but I can't find my error: UPDATE `userTable` SET `someField`=Jimmy Page FROM `userTable` INNER JOIN `anotherTable` ON `userTable.userid`=`anotherTable.userid` WHERE `userTable.someField`=Jim Morrison AND `anotherTable.date` NOW(); ERROR 1064 (42000): You

Re: Update on inner join - looks good to me, where did I go wrong?

2011-09-09 Thread Dotan Cohen
Now that I've got the syntax right, MySQL is complaining that a field does not exist, which most certainly does: mysql UPDATE - `userTable` - INNER JOIN `anotherTable` - ON `userTable.userid`=`anotherTable.userid` - SET `userTable.someField`=Jimmy Page - WHERE

Re: Update on inner join - looks good to me, where did I go wrong?

2011-09-09 Thread Carsten Pedersen
`userTable.userid` = `userTable`.`userid` / Carsten On 09-09-2011 23:01, Dotan Cohen wrote: Now that I've got the syntax right, MySQL is complaining that a field does not exist, which most certainly does: mysql UPDATE - `userTable` - INNER JOIN `anotherTable

strange mysql update ..

2011-09-08 Thread umapathi b
-19 11:20:07 course_id: 1011 regulator_id: 10840 test_info: completion_date: 2011-06-19 11:37:16 print_date: NULL password: test1140dl certificate_number: NULL login: test114...@1140dl.com I fired the update statement in a wrong way

Re: strange mysql update ..

2011-09-08 Thread Ananda Kumar
:16 print_date: NULL password: test1140dl certificate_number: NULL login: test114...@1140dl.com I fired the update statement in a wrong way ..like this .. update user_info set login_date='2011-08-05 04:15:05' and user_id =16078845 limit 1 ; ( I forgot to use where

Re: strange mysql update ..

2011-09-08 Thread umapathi b
Here is the o/p after the update .. user_id: 16078845 drivers_license: TEST1140DL login_date: 2011-06-19 11:20:07 course_id: 1011 regulator_id: 10840 test_info: completion_date: 2011-06-19 11:37:16 print_date: NULL

Re: strange mysql update ..

2011-09-08 Thread Rik Wasmus
I fired the update statement in a wrong way ..like this .. update user_info set login_date='2011-08-05 04:15:05' and user_id =16078845 limit 1 ; ( I forgot to use where . instead of where I used and ) update user_info set login_date='2011-08-05 04:15:05' where user_id =16078845 limit 1

Re: strange mysql update ..

2011-09-08 Thread Suresh Kuna
Nice Rik! On Thu, Sep 8, 2011 at 3:19 PM, Rik Wasmus r...@grib.nl wrote: I fired the update statement in a wrong way ..like this .. update user_info set login_date='2011-08-05 04:15:05' and user_id =16078845 limit 1 ; ( I forgot to use where . instead of where I used and ) update

Re: Is is possible to update a column based on a REGEXP on another column?

2011-01-24 Thread Johan De Meersman
each and update them but was wondering if there is a way to do this within mysql itself? The regexp only returns a boolean so I can't see how to use that. Regards Phil -- Distributed Computing stats http://stats.free-dc.org -- MySQL General Mailing List For list archives

Re: Is is possible to update a column based on a REGEXP on another column?

2011-01-22 Thread Eric Bergen
and update them but was wondering if there is a way to do this within mysql itself? The regexp only returns a boolean so I can't see how to use that. Regards Phil -- Distributed Computing stats http://stats.free-dc.org -- MySQL General Mailing List For list archives: http://lists.mysql.com

Is is possible to update a column based on a REGEXP on another column?

2011-01-21 Thread Phil
could write something in perl or php to run through each and update them but was wondering if there is a way to do this within mysql itself? The regexp only returns a boolean so I can't see how to use that. Regards Phil -- Distributed Computing stats http://stats.free-dc.org

Re: update and times

2010-10-07 Thread Simcha Younger
On Wed, 06 Oct 2010 17:48:55 -0400 kalin m ka...@el.net wrote: Simcha Younger wrote: executing this query didn't update the record. why? The two values you have here are equal: sample data : 12862162510269684 query: where unix_time 12862162510269684

Re: update and times

2010-10-06 Thread kalin m
Simcha Younger wrote: On Mon, 04 Oct 2010 16:11:08 -0400 kalin m ka...@el.net wrote: what i'm trying to do is update the column only of one of those times isn't yet passed. and it works. except sometimes... like these 2 unix times: this was in the table under unix time

Re: update and times

2010-10-05 Thread Simcha Younger
On Mon, 04 Oct 2010 16:11:08 -0400 kalin m ka...@el.net wrote: what i'm trying to do is update the column only of one of those times isn't yet passed. and it works. except sometimes... like these 2 unix times: this was in the table under unix time: 12862162385941345

update and times

2010-10-04 Thread kalin m
| 12859504483288358 | +-+---+ what i'm trying to do is update the column only of one of those times isn't yet passed. and it works. except sometimes... like these 2 unix times: this was in the table under unix time: 12862162385941345

RE: update and times

2010-10-04 Thread Gavin Towey
] Subject: update and times hi all... i'm doing tests with a table that gets updated based on random unix times it contains. there is a column that has a bunch or random times that look like: +-+---+ | date_time | unix_time

Re: update and times

2010-10-04 Thread kalin m
right the unix times in the example table were just that - examples from a few days ago... the example with the query was a 'real one' something that happened today... it's a 64 bit machine. the unix times are stored in a bigint column. the times in the column and the update

Update Table

2010-09-27 Thread Willy Mularto
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

Re: Update Table

2010-09-27 Thread Nigel Wood
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

Re: Persistent Connection VS One Time Connection Was Update Table

2010-09-27 Thread Willy Mularto
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

Re: Update record count

2010-09-17 Thread Johan De Meersman
On Fri, Sep 17, 2010 at 3:51 AM, Shawn Green (MySQL) shawn.l.gr...@oracle.com wrote: So if 10 rows of A match your conditions, 1 row from B match your conditions, and 10 rows from C match your conditions, then this query produces 10*1*10 total row combinations. Umm. It's friday, so I may

RE: Update record count

2010-09-17 Thread Jerry Schwartz
-Original Message- From: Shawn Green (MySQL) [mailto:shawn.l.gr...@oracle.com] Sent: Thursday, September 16, 2010 9:51 PM To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: Update record count On 9/16/2010 5:12 PM, Jerry Schwartz wrote: I should be able to figure this out, but I'm

Update query problem

2010-09-16 Thread Andy Wallace
So I'm having a problem with an update query. I have three tables: Table: A Columns: acnt, name, company, email, domain Table: AM Columns: acnt, m_id Table: M Columns: m_id, name, company, email, domain and I want to conditionally update the columns in one to values from the other. i.e

RE: Update query problem

2010-09-16 Thread Travis Ard
Try using the IS NULL operator instead of ! -Travis -Original Message- From: Andy Wallace [mailto:awall...@ihouseweb.com] Sent: Thursday, September 16, 2010 10:47 AM To: mysql@lists.mysql.com Subject: Update query problem So I'm having a problem with an update query. I have three

Update record count

2010-09-16 Thread Jerry Schwartz
I should be able to figure this out, but I'm puzzled. Here's a simplified example: UPDATE a JOIN b ON a.kb = b.kb JOIN c ON b.kc = c.kc SET a.f1 = NOW(), b.f2 = NOW() WHERE c.f3 IN ('x', 'y', 'z') AND b.f4 = 'yen'; It seems to me that if there are 3 rows found in `c` that match a total of 10

Re: Update record count

2010-09-16 Thread Shawn Green (MySQL)
On 9/16/2010 5:12 PM, Jerry Schwartz wrote: I should be able to figure this out, but I'm puzzled. Here's a simplified example: UPDATE a JOIN b ON a.kb = b.kb JOIN c ON b.kc = c.kc SET a.f1 = NOW(), b.f2 = NOW() WHERE c.f3 IN ('x', 'y', 'z') AND b.f4 = 'yen'; It seems to me

update replace() regex

2010-07-08 Thread Egor Shevtsov
Hi ALL, I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a 'dash' character with a space in the string. Something like: UPDATE table SET column = replace(column, regex '%-%', ' ') where id

Re: update replace() regex

2010-07-08 Thread Dan Nelson
In the last episode (Jul 08), Egor Shevtsov said: I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a 'dash' character with a space in the string. Something like: UPDATE table SET column

Re: update replace() regex

2010-07-08 Thread Egor Shevtsov
Thanks Dan, I tested it just now. It works perfectly. Dan Nelson wrote: In the last episode (Jul 08), Egor Shevtsov said: I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a 'dash

fast update with 1:1 table?

2010-04-09 Thread Mitchell Maltenfort
I have two tables, A and B. B has newer data, A has more columns. I want to update some of the columns in A with all but one of the columns in B. They have the same number of records -- about eight million -- and one key column in common for matching. (That's the one from B I don't want

Re: fast update with 1:1 table?

2010-04-09 Thread Ananda Kumar
, A and B. B has newer data, A has more columns. I want to update some of the columns in A with all but one of the columns in B. They have the same number of records -- about eight million -- and one key column in common for matching. (That's the one from B I don't want to update) I get the idea

how to update entire column with different values

2010-02-05 Thread muralikrishna g
hi.. i am in need to update a column with different values in a single query i know how to update a value of single column and single row element, and single row multiple columns. but i dont know how to update multiple values of a single column. if any body know the syntax for it please help me

RE: how to update entire column with different values

2010-02-05 Thread misiaQ
You mean the SET data type..? http://dev.mysql.com/doc/refman/5.0/en/set.html Regards, m -Original Message- From: muralikrishna g [mailto:muralikrishn...@gmail.com] Sent: Friday, February 05, 2010 10:38 AM To: mysql@lists.mysql.com Subject: how to update entire column with different

how to update a entire column elements

2010-02-05 Thread MuraliKrishna
Hi I am in need to update a entire column elements with different values. If any body know the syntax please help me.. Regarding this.. Thanks in advance By Muralikrishna

Re: how to update a entire column elements

2010-02-05 Thread Johan De Meersman
update table set column=value where condition. value may be calculated based on other columns or whatever. If you need to set n rows to arbitrary values, however, you'll need to issue multiple statements. On Fri, Feb 5, 2010 at 11:50 AM, MuraliKrishna murali_kris...@arthaoptions.com wrote

Re: how to update a entire column elements

2010-02-05 Thread Jo�o C�ndido de Souza Neto
Are you talking about data in column ou structure of table? MuraliKrishna murali_kris...@arthaoptions.com escreveu na mensagem news:4b6bf981.0807c00a.0cba.2...@mx.google.com... Hi I am in need to update a entire column elements with different values. If any body know the syntax please help

RE: how to update entire column with different values

2010-02-05 Thread misiaQ
Once you can group your rules into something reasonable you can use syntax like this one: UPDATE city SET cityClass = CASE WHEN population 1000 THEN 1 WHEN population 50 THEN 2 WHEN

Re: how to update a entire column elements

2010-02-05 Thread RaMeSh
Kindly draft you question clearly with scenario example, so that the solution should be clear. On 5 February 2010 16:20, MuraliKrishna murali_kris...@arthaoptions.comwrote: Hi I am in need to update a entire column elements with different values. If any body know the syntax please help me

Re: mysql update

2010-01-22 Thread Suresh Kuna
...@gmail.com wrote: I have the following update procedure that update mySQL DB over the internet between source Linux Centos (local machine on my net behind a DMZ with real IP A.B.C.D) and target Linux fedora (web server www.myweb.com) every day on a specific time 18:00 through a crontab on my

Re: mysql update

2010-01-22 Thread Krishna Chandra Prajapati
, Krishna On Fri, Jan 22, 2010 at 12:25 PM, madunix madu...@gmail.com wrote: I have the following update procedure that update mySQL DB over the internet between source Linux Centos (local machine on my net behind a DMZ with real IP A.B.C.D) and target Linux fedora (web server www.myweb.com) every

mysql update

2010-01-21 Thread madunix
I have the following update procedure that update mySQL DB over the internet between source Linux Centos (local machine on my net behind a DMZ with real IP A.B.C.D) and target Linux fedora (web server www.myweb.com) every day on a specific time 18:00 through a crontab on my source linux server

RE: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-18 Thread Gavin Towey
I think Baron was referring to a technique like this: you sell a t-shirt, UPDATE table SET t=t-X WHERE t = X, if you get rows affected, it's sold and ok. if not, the stock ran out before the operation. but it's safe. see http://dev.mysql.com/tech-resources/articles/storage-engine/part_3.html

Re: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-15 Thread Perrin Harkins
On Fri, Jan 15, 2010 at 2:54 AM, Johan Machielse johan.machie...@kpnplanet.nl wrote: The problem is that multiple users can read and update the same field simultaneously (worse case) which could lead to unpredictable problems. There are other ways to do handle most cases. For example: UPDATE

When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-14 Thread Johan Machielse
Hi, I have created a query to read and update a stock item by using the FOR UPDATE statement. According to the MySql documention only the rows that are selected using the FOR UPDATE should be locked for other sessions, but somehow whole the table is locked. This post gives some general

Re: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-14 Thread Baron Schwartz
Johan, I don't see a valid need for using FOR UPDATE here. In fact, FOR UPDATE is the cause of many grievances, and I would advise you to avoid it by any means possible. Among other things, it will cause serious performance problems when your server gets busy. And as you can see, it's hard

Re: When using FOR UPDATE whole the table seems to lock instead of selected row

2010-01-14 Thread Johan Machielse
Hi Baron, Thank you for your answer. The problem is that multiple users can read and update the same field simultaneously (worse case) which could lead to unpredictable problems. According to the MySql online documentation (http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html

Re: UPDATE and simultaneous SELECT ... similar to RETURNING?

2009-12-25 Thread Baron Schwartz
Dante, On Tue, Dec 22, 2009 at 3:53 PM, Dante Lorenso da...@lorenso.com wrote: All, There was a feature of another DB that I have grown extremely accustomed to and would like to find the equivalent in MySQL: UPDATE mytable SET mycolumn = mycolumn + 1 WHERE mykey = 'dante' RETURNING

Re: two processes update the same column in short time

2009-12-25 Thread Don Read
On Fri, 25 Dec 2009 15:41:40 +0800 Eva said: Hello, I have a table, say its stru is like: domain ip noticed The column noticed is an enum value (eigher 0 or 1). When process one update ip, it will set noticed to 0. Then process two know the status changed, it will do

Re: two processes update the same column in short time

2009-12-25 Thread Eva
2009-12-26 2:36, Don Read : Change noticed to enum('new', 'scan', 'done') not null default 'new'; When proc two runs, it should UPDATE noticed='scan' WHERE noticed='new' Then repeat the scan with SELECT ... WHERE noticed='scan' ... and finally it should UPDATE domain=whatever, ... noticed

Re: two processes update the same column in short time

2009-12-25 Thread Don Read
On Sat, 26 Dec 2009 10:43:55 +0800 Eva said: 2009-12-26 2:36, Don Read : Change noticed to enum('new', 'scan', 'done') not null default 'new'; When proc two runs, it should UPDATE noticed='scan' WHERE noticed='new' Then repeat the scan with SELECT ... WHERE noticed='scan

two processes update the same column in short time

2009-12-24 Thread Eva
Hello, I have a table, say its stru is like: domain ip noticed The column noticed is an enum value (eigher 0 or 1). When process one update ip, it will set noticed to 0. Then process two know the status changed, it will do something and set noticed to 1. What the problem I meet

UPDATE and simultaneous SELECT ... similar to RETURNING?

2009-12-22 Thread Dante Lorenso
All, There was a feature of another DB that I have grown extremely accustomed to and would like to find the equivalent in MySQL: UPDATE mytable SET mycolumn = mycolumn + 1 WHERE mykey = 'dante' RETURNING mycolumn; The magic of this statement is in the RETURNING clause. RETURNING causes every

Update Doesn't Update!

2009-12-11 Thread Victor Subervi
Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 mysql select sizes, colorsShadesNumbersShort from products where ID=0; +---+--+ | sizes

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Warnings: 1 do a SHOW WARNINGS

Re: Update Doesn't Update!

2009-12-11 Thread Jørn Dahl-Stamnes
On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the message, 0 rows changed

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Martijn Tonies
mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the message, 0 rows changed and 1 warning. You cannot have ID=0 if ID is an index. Are you

RE: Update Doesn't Update!

2009-12-11 Thread misiaQ
If ID column is primary key and auto increment as you said, it cant be equal to zero. You got a query which reads: UPDATE columns WHERE false There is no chance for any updates. http://dev.mysql.com/doc/refman/5.0/en/update.html Regards, m -Original Message- From: Victor Subervi

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:43 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 10:48:59 +0100, Jørn Dahl-Stamnes sq...@dahl-stamnes.net wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 mysql show warnings

Re: Update Doesn't Update!

2009-12-11 Thread Mark Goodge
Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look

Re: Update Doesn't Update!

2009-12-11 Thread Yang Wang
first desc products or try to update products set sizes='Small' where SKU='prodSKU1'; Best Regards! Yang Wang Tel.: 0769-21687397 Fax.: 0769-21685577 Email: yw...@lfm-agile.com.hk - Original Message - From: cars...@bitbybit.dk To: Victor Subervi victorsube...@gmail.com Cc: mysql

Re: Update Doesn't Update!

2009-12-11 Thread Chris Knipe
| +-++ | 0 | 1234567890 | +-++ 1 row in set (0.00 sec) mysql UPDATE test SET value='a' WHERE autoinc='0'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql SELECT * FROM test; +-+---+ | autoinc | value

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi victorsube...@gmail.com wrote: On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 mysql show warnings; +-+--++ | Level | Code

Re: Update Doesn't Update!

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 8:43 AM, Johan De Meersman vegiv...@tuxera.bewrote: On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small

Re: Update Doesn't Update!

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 6:40 PM, Victor Subervi victorsube...@gmail.comwrote: I'm lost. I set up this database originally with auto_increment and the first value was 0. I thought that was always the case. Is there a problem here? Yes, that should not have happened. For autoincrement fields,

Re: who knows the difference between INSERT and UPDATE

2009-12-06 Thread mos
At 12:13 AM 12/6/2009, Oscar wrote: hi all, Someone told me that UPDATE equals DELETE old row + INSERT new row. Anybody clarify it? Are you talking about InnoDb or MyISAM tables. I'm only familiar with MyISAM tables. Perhaps he was referring to an Update that added more text to a variable

who knows the difference between INSERT and UPDATE

2009-12-05 Thread Oscar
hi all, Someone told me that UPDATE equals DELETE old row + INSERT new row. Anybody clarify it? thanks, -Oscar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

update fields with a prefix - ?? how to

2009-10-19 Thread lejeczek
dear all, a novice here quickie regarding query syntax - is it possible to take fields values from one column and update the same column with new values like this: prefix_OldValue column: one, two, three - column: prefix_one, prefix_two, ... can this be done with one query and with on use

Re: update fields with a prefix - ?? how to

2009-10-19 Thread Johan De Meersman
Something in the ilk of update *table* set *field* = concat(prefix_, *field*) where *condition * should do the trick. On Mon, Oct 19, 2009 at 4:56 PM, lejeczek pelj...@yahoo.co.uk wrote: dear all, a novice here quickie regarding query syntax - is it possible to take fields values from one

Benetl, a free ETL tool for files using postgreSQL, is out in version 3.1 - update

2009-09-22 Thread benoît carpentier
Dear all, Benetl, a free ETL tool for files using postgreSQL (and now MySQL), is out in version 3.1. A small correction has been done to Benetl 3.1. This is now available online. You can freely download it at : www.benetl.net This new version brings the support of long as date. Benetl will

Re: Speeding up a pretty simple correlated update query

2009-09-06 Thread Hank
Hello All, I'm reposting this since I didn't get much response the last time, so I'm hoping to reach out again. My correlated update query (see below) was running for 9 days before I killed it. Here is my original question: I have a legacy application which was written using a compound

Re: Speeding up a pretty simple correlated update query

2009-09-06 Thread mos
wrote: Hello All, I'm reposting this since I didn't get much response the last time, so I'm hoping to reach out again. My correlated update query (see below) was running for 9 days before I killed it. Here is my original question: I have a legacy application which was written using a compound

Re: Speeding up a pretty simple correlated update query

2009-09-06 Thread Hank
On Sun, Sep 6, 2009 at 6:01 PM, mos mo...@fastmail.fm wrote: So I've disabled all the keys on the item_trans table -- since I am updating every row, it wouldn't (shouldn't) be using the index anyway. You can't disable unique indexes or primary keys. They are always active. You can only

Speeding up a pretty simple correlated update query

2009-09-02 Thread Hank
) | NO | PRI | | | | category| char(4) | NO | PRI | | | | transid | int(10) | NO | PRI | | | Currently the seq field is null for the entire table. So of course, I want to update

RE: Speeding up a pretty simple correlated update query

2009-09-02 Thread Gavin Towey
Do you know that if you create seq column on the original table as an auto_increment primary key, it will fill in the numbers automatically? There's no need to create the values on another table and update with a join. Regards, Gavin Towey -Original Message- From: Hank [mailto:hes

Re: Speeding up a pretty simple correlated update query

2009-09-02 Thread Hank
the transaction table, leaving only the new item sequence id (plus transid) as the primary key. There are many tables throughout the schema that do this, and I would be replacing them all. It's just that this is the largest table, and the correlated update is taking a long time, and I'm looking for a better

Re: Mysql update query gives error of lock wait timeout

2009-08-29 Thread muhammad subair
On Sat, Aug 29, 2009 at 12:09 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Hi All, I have a query which gives an error of lock wait timeout only this transaction is running with 2 records in the table. The query is : Update Test Set TestFlag = 1 Where TestID = 5; Can

Re: Mysql update query gives error of lock wait timeout

2009-08-29 Thread Manasi Save
Hi, You are right. The storage engine i m using is InnoDB. but then my concern is why this simple update query takes so long. Is it true that if its innodb table then even after specifying where condition it scans all indexed rows. I am bit confused as mysql.com have mentioned on there site

Re: Mysql update query gives error of lock wait timeout

2009-08-29 Thread Krishna Chandra Prajapati
in the table. The query is : Update Test Set TestFlag = 1 Where TestID = 5; Can this one transaction lock my entire table? -- Thanks and Regards, Manasi Save Artificial Machines Pvt Ltd. manasi.s...@artificialmachines.com Ph:- 9833537392 -- MySQL General Mailing List For list

Mysql update query gives error of lock wait timeout

2009-08-28 Thread Manasi Save
Hi All, I have a query which gives an error of lock wait timeout only this transaction is running with 2 records in the table. The query is : Update Test Set TestFlag = 1 Where TestID = 5; Can this one transaction lock my entire table? -- Thanks and Regards, Manasi Save Artificial

update client

2009-08-23 Thread m. zamil
Hello all, due to connection state, I need to keep an updated copy of the database on the client. How can I accomplish this? TIA Mos

Re: update client

2009-08-23 Thread Walter Heck - OlinData.com
Check out replication. On Sun, Aug 23, 2009 at 09:00, m. zamil mza...@saudi.net.sa wrote: Hello all, due to connection state, I need to keep an updated copy of the database on the client. How can I accomplish this? TIA Mos -- Walter Heck, Engineer @ Open Query (http://openquery.com)

Re: How to Detect MySql table update/difference

2009-08-06 Thread Martijn Tonies
Hi, Hi, I'm a novel developer of MySql and now I am trying to create a mysql query to detect table updates. I query a database table every X seconds, and i want to get only the different rows in the table. The result that I want to have is simply TABLE (t = now) - TABLE (t = X second ago)

How to Detect MySql table update/difference

2009-08-05 Thread BS TLC
Hi, I'm a novel developer of MySql and now I am trying to create a mysql query to detect table updates. I query a database table every X seconds, and i want to get only the different rows in the table. The result that I want to have is simply TABLE (t = now) - TABLE (t = X second ago) Every

RE: How to Detect MySql table update/difference

2009-08-05 Thread Rolando Edwards
[mailto:bs...@ymail.com] Sent: Wednesday, August 05, 2009 10:30 AM To: mysql@lists.mysql.com Subject: How to Detect MySql table update/difference Hi, I'm a novel developer of MySql and now I am trying to create a mysql query to detect table updates. I query a database table every X seconds

Re: How to Detect MySql table update/difference

2009-08-05 Thread BS TLC
MySql table update/difference I have good news and bad news for you when it comes to MySQL 5.x. Good News if you are counting against MyISAM Bad News if you are counting against InnoDB Good News - For MyISAM Just use either SELECT table_rows FROM information_schema.tables WHERE

RE: How to Detect MySql table update/difference

2009-08-05 Thread Daevid Vincent
, August 05, 2009 2:57 PM To: Rolando Edwards; mysql@lists.mysql.com Subject: Re: How to Detect MySql table update/difference Ok, but in this way I can only detect if it's done ONE type of operation, for example if I add a row and I remove an another one with this query I detect

Update Syntax

2009-07-26 Thread Victor Subervi
Hi; I would like to test the following: update maps set map where site=mysite; to see if there is such an entry in maps. If there is, then update. If there is not, then I would like to execute an insert statement. How do I do that? TIA, Victor

Re: Update Syntax

2009-07-26 Thread Michael Dykman
from: http://dev.mysql.com/doc/refman/5.1/en/insert.html: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ] The ON DUPLICATE KEY predicate tells

Re: Update Syntax

2009-07-26 Thread Darryle Steplight
Hi Vicor, Look into INSERT ON DUPLICATE or REPLACE statements. You need to have a primary key or unique key for these too work. On Sun, Jul 26, 2009 at 1:11 PM, Victor Subervivictorsube...@gmail.com wrote: Hi; I would like to test the following: update maps set map where site=mysite

<    1   2   3   4   5   6   7   8   9   10   >