473,395 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

insert ignore

Are you allowed to use the following syntax in Mysql 4.0.17-nt :

INSERT DELAYED IGNORE INTO `mytable` ( `ID` , `A` , `B` ) VALUES
("'.session_id().'", "2", ROUND(NOW()/10000) );

I am particularly interested in the delayed ignore. I want to make sure
that no matter what, the instruction is carried out and that, due to
indexes, the data is not allowed to go in, that we do not get an error.

TIA

- Nicolaas
Oct 6 '05 #1
1 8720
windandwaves wrote:
Are you allowed to use the following syntax in Mysql 4.0.17-nt :
DELAYED was introduced in MySQL 3.22.15.
There doesn't seem to be doc on when IGNORE was introduced, but I assume
it was present before 4.0.17.
INSERT DELAYED IGNORE INTO `mytable` ( `ID` , `A` , `B` ) VALUES
("'.session_id().'", "2", ROUND(NOW()/10000) );

I am particularly interested in the delayed ignore. I want to make sure
that no matter what, the instruction is carried out and that, due to
indexes, the data is not allowed to go in, that we do not get an error.


Note that currently the queued rows are held only in memory until they
are inserted into the table. This means that if you terminate mysqld
forcibly (for example, with kill -9) or if mysqld dies unexpectedly, any
queued rows that have not been written to disk are lost!

This seems not to support your requirement that the instruction is
carried out, no matter what. Better to avoid DELAYED if that is required.

Are you sure you need to use DELAYED. This modifier is meant to queue
up inserts for later insertion, if the table is currently being read by
another thread. Also, DELAYED is not relevant for InnoDB tables, since
in that storage engine, readers do not block writers, and vice versa.

Have you read about the purpose and the limitations of DELAYED on this page:
http://dev.mysql.com/doc/mysql/en/insert-delayed.html ?

Regards,
Bill K.
Oct 6 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: newbie_mw | last post by:
Seems my post was buried in more cries for help :-) I will try again. It's probably a very novice question so please take a look! Thanks!...
1
by: Gary Lundquest | last post by:
It appears to me that MySQL version 4 returns an error messge when doing an Insert that results in duplicate entries. Version 3 did NOT return an error - it dropped the duplicate entries and ran...
1
by: Thomas Bartkus | last post by:
The meaning of REPLACE INTO is clear to me. IF the new record presents new key values, then it is inserted as a new record. IF the new record has key values that match a pre-existing record, then...
1
by: windandwaves | last post by:
Are you allowed to use the following syntax in Mysql 4.0.17-nt : INSERT DELAYED IGNORE INTO `mytable` ( `ID` , `A` , `B` ) VALUES ("'.session_id().'", "2", ROUND(NOW()/10000) ); I am...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
1
by: Maria | last post by:
Hello I have not used db2 in a long time, and I have this very long insert script, which is giving me an error of duplicated inserts. My question is how can I put something in the statment so...
3
by: shorti | last post by:
I am looking for a way to insert into one table from another table but ignore duplicates (because the query will fail since the column I am inserting into is a unique index). RE: INSERT INTO...
2
by: TheRomance | last post by:
i have a problem about insert integer to link list. sorry it's too long but i try many times, many ways , it's still have an error function is fix . can't change anything about function. i...
4
bugboy
by: bugboy | last post by:
I'm inserting a new word into table 'w' and a definition into table 'c' which are linked in table 's' which is the relation table for the many to many relationship between 'w' and 'c'. I've been...
8
by: Red | last post by:
If auto-format is turned off in VS2008, there is apparently no way to indent a line. Under Tools->Options->Text Editor->C#->Formatting, there are three checkboxes. Unchecking those seems to cause...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.