-Original Message-
From: Andrés Tello [mailto:mr.crip...@gmail.com]
Sent: May 12, 2012 10:08 AM
To: mysql
Subject: Mysql is toying me... why sometimes an insert or update can be
slow!? I getting bald cuz this
While doning a batch process...
show full processlist show:
| 544
is accountid a number or varchar column
On Sat, May 12, 2012 at 7:38 PM, Andrés Tello mr.crip...@gmail.com wrote:
While doning a batch process...
show full processlist show:
| 544 | prod | 90.0.0.51:51262 | tmz2012 | Query |6 |
end | update `account` set
Yes, I'm using indexes, accountid is the primary key, and is numeric and
autoincrement. The process doing the deadlock is no longer done...
The structure of the inserted database has changed.
Originaly it was a single table with 219millions rows, now I partitioned
the hable in... 60 tables, 1
If numeric, then why are u using quotes. With quotes, mysql will ignore the
index and do a full table scan
On Mon, May 14, 2012 at 7:31 PM, Andrés Tello mr.crip...@gmail.com wrote:
Yes, I'm using indexes, accountid is the primary key, and is numeric and
autoincrement. The process doing the
- Original Message -
From: Ananda Kumar anan...@gmail.com
If numeric, then why are u using quotes. With quotes, mysql will
ignore the index and do a full table scan
Will it? Common sense dictates that it would convert to the column's native
type before comparing; and a quick explain
I used to have these issues in mysql version 5.0.41.
On Mon, May 14, 2012 at 8:13 PM, Johan De Meersman vegiv...@tuxera.bewrote:
- Original Message -
From: Ananda Kumar anan...@gmail.com
If numeric, then why are u using quotes. With quotes, mysql will
ignore the index and do a
While doning a batch process...
show full processlist show:
| 544 | prod | 90.0.0.51:51262 | tmz2012 | Query |6 |
end | update `account` set `balance`= 0.00 +
'-4000' where accountid='2583092'
No other process, lo locking no nothing...
so you take this same
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
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
Paul Warner wrote:
When a user enters text with a £ sign (Great Britain Pound) in the
browser and clicks enter, any insert or update statement apparently
gets truncated in mysql.
It's possible that somewhere along the line, the character is getting
translated to a multibyte Unicode format
Warren Young wrote:
Paul Warner wrote:
When a user enters text with a £ sign (Great Britain Pound) in the
browser and clicks enter, any insert or update statement apparently
gets truncated in mysql.
It's possible that somewhere along the line, the character is getting
translated
Warren Young wrote:
Paul Warner wrote:
When a user enters text with a £ sign (Great Britain Pound) in the
browser and clicks enter, any insert or update statement apparently
gets truncated in mysql.
It's possible that somewhere along the line, the character is getting
translated
Paul Warner wrote:
Now we are in UTF-8, it is saving everything I can throw at it
without creating garbage characters. Whew.
Yep. Even though it wasn't the solution to your immediate problem,
switching to UTF-8 will prevent a whole class of future ones.
--
MySQL General Mailing List
For
for each request). I added the
following code that processes all the fields before submitting to the database
for update or insert.
Charset utfCharset = Charset.forName(UTF-8);
CharsetDecoder decoder = utfCharset.newDecoder();
CharsetEncoder encoder = utfCharset.newEncoder();
try {
ByteBuffer
Hi List,
I would like to know if it is possible to combine Insert and Update in one
SQL instruction. This is what I want to do:
I have two tables: one where I will perform and Update replacing m0 by
scr. If MySQL find a m0, it will need to perform an insert into a log
table including
this on was running 4.0.x so I
couldn't use it.
http://dev.mysql.com/doc/refman/5.0/en/insert.html
- Original Message -
From: Andre Matos [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, February 11, 2006 10:54 AM
Subject: Insert and Update together
Hi List,
I would like
Oops, I meant to send this to the list so that everyone could benefit, not
just to Andre.
--
Rhino
- Original Message -
From: Rhino [EMAIL PROTECTED]
To: Andre Matos [EMAIL PROTECTED]
Sent: Saturday, February 11, 2006 12:11 PM
Subject: Re: Insert and Update together
was testing this on was running 4.0.x so I
couldn't use it.
http://dev.mysql.com/doc/refman/5.0/en/insert.html
- Original Message -
From: Andre Matos [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, February 11, 2006 10:54 AM
Subject: Insert and Update together
---
-Original Message-
From: Andre Matos [mailto:[EMAIL PROTECTED]
Sent: Sunday, 12 February 2006 2:23 PM
To: George Law; mysql@lists.mysql.com
Subject: Re: Insert and Update together
No George. I took a look there before sent this email
@lists.mysql.com
Subject: RE: Triggers that handle multiple events (insert and update)
onsdagen den 9 november 2005 18:07 skrev Burke, Dan:
For example, one field has to be = 0, so I put this validation
Why don't you just declare that field as unsigned?
Björn Persson
--
MySQL General Mailing List
Hello,
Can triggers in 5.0 handle multiple events? I have some range checking
I'd like to enforce at the database level when inserting or updating a
record, and I'm finding myself duplicating trigger code to make an
INSERT and an UPDATE trigger, which makes it harder to maintain in the
long run
Burke, Dan [EMAIL PROTECTED] wrote on 11/09/2005 09:05:50 AM:
Hello,
Can triggers in 5.0 handle multiple events? I have some range checking
I'd like to enforce at the database level when inserting or updating a
record, and I'm finding myself duplicating trigger code to make an
INSERT
I see what you're saying. That won't really help, because I'll still be
duplicating changes in the update and insert triggers every time I add a
new field. The hope was that I would only need to do it once. Your
method sounds like it could become costly from an execution time
perspective
onsdagen den 9 november 2005 18:07 skrev Burke, Dan:
For example, one field has to be = 0, so I put this validation
Why don't you just declare that field as unsigned?
Björn Persson
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Hi,
I have a table that looks something like this:
ip | mac_current | mac_change
now if I have an entry that looks like this
10.0.0.1 | 11:11:11:11:11:11:11 | NULL
If the next time the script runs and the mac has changed, how can I
catch this and put the new MAC into mac_change?
Ultimately,
Hello.
Please, provide more information on your's application logic.
To catch events which occurs for the table use triggers. See:
http://dev.mysql.com/doc/mysql/en/triggers.html
Unfortunately they're available only in MySQL 5.0.x, which is still
beta.
Paul Halliday [EMAIL
Ok,
The entire table looks like this:
ip | hostname | mac_current | mac_change | port_current | port_change
The IP addresses are harvested via netflow (a different table) and or
arpwatch (an event). This new table is to augment the current
information that is within the netflow tables but
@lists.mysql.com
Subject: Re: Insert if Update failed without Select
[EMAIL PROTECTED] wrote:
Please also note hat UPDATE returns the number of records updated. If
your
UPDATE returns 0, you know that the record does not exist, and you
might
want to INSERT instead.
There is one situation
Please also note hat UPDATE returns the number of records updated. If your
UPDATE returns 0, you know that the record does not exist, and you might
want to INSERT instead.
There is one situation where the number of records updated will return
0, yet the row exists. If you update the record
[EMAIL PROTECTED] wrote:
Please also note hat UPDATE returns the number of records updated. If your
UPDATE returns 0, you know that the record does not exist, and you might
want to INSERT instead.
There is one situation where the number of records updated will return
0, yet the row exists.
Hi,
Without using Select statement, how can I execute Insert SQL statement
if Update action is failed?
I may be asking for too much. If Select statemnet have to be used to
determine the existence of a recordset, what is an efficient way to
execute Insert if Update is failed? I m using MySQL 5.0
At 2005-01-15 14:48, you wrote:
Without using Select statement, how can I execute Insert SQL statement if
Update action is failed?
I may be asking for too much. If Select statemnet have to be used to
determine the existence of a recordset, what is an efficient way to
execute Insert if Update
SQL statement if
Update action is failed?
I may be asking for too much. If Select statemnet have to be used to
determine the existence of a recordset, what is an efficient way to
execute Insert if Update is failed? I m using MySQL 5.0
Look at http://dev.mysql.com/doc/mysql/en/REPLACE.html
--
MySQL
INSERT vs UPDATE
Hello,
I am new to the list, so pardon me if I am on the wrong one posting my
question. If so, please direct me to the right place.
My question is in regards to the efficiency of INSERT statements. I have
gone over some of the optimizations, and on a machine running
As my post suggested, I have already addressed the tweaks this this
section of the manual addresses, and was hoping there might be some insight
on my original question, the process of INSERT vs UPDATE. That chapter was
helpful initially, but I have already addressed most of what that chapter
As my post suggested, I have already addressed the tweaks this this
section of the manual addresses, and was hoping there might be some insight
on my original question, the process of INSERT vs UPDATE.
Gotcha. I wasn't sure if you'd checked the manual or just run a huge number of
EXPLAINs
INSERT vs UPDATE
As my post suggested, I have already addressed the tweaks this this
section of the manual addresses, and was hoping there might be some
insight
on my original question, the process of INSERT vs UPDATE.
Gotcha. I wasn't sure if you'd checked the manual or just run a huge
number
Hello,
I am new to the list, so pardon me if I am on the wrong one posting my question.
If so, please direct me to the right place.
My question is in regards to the efficiency of INSERT statements. I have gone over
some of the optimizations, and on a machine running the client and
corereader contains safeguards to prevent updates,
but its design helps quick development of queries
such as yours. you can do a multiple join with
multiple selects just by pointing and clicking to
try out various ideas.
it's free at http://corereader.com/
it installs at the novice skill
Hi,
i am inserting data in a mysql table like this:
INSERT INTO mytable1
(bu_main_id)
SELECT main_id FROM mytable2
WHERE username=\$username\
that's ok.
but now i would like to insert 2 values (bu_main_id and status), and i
would like to know, is it possible to
At 15:54 +0200 10/5/02, Mirza wrote:
Hi,
i am inserting data in a mysql table like this:
INSERT INTO mytable1
(bu_main_id)
SELECT main_id FROM mytable2
WHERE username=\$username\
that's ok.
but now i would like to insert 2 values (bu_main_id and status),
Hello all,
I need to write a query that will insert data into a table if there is no
row matching a pre-specified ID, but will update a row if it matches a
pre-specified ID.
Any pointers would be great.
-
Before posting,
* Joel Wickard
I need to write a query that will insert data into a table if there is no
row matching a pre-specified ID, but will update a row if it matches a
pre-specified ID.
Any pointers would be great.
The REPLACE statement:
URL: http://www.mysql.com/doc/R/E/REPLACE.html
--
Roger
43 matches
Mail list logo