Jump to content

Archived

This topic is now archived and is closed to further replies.

king arthur

When to use INSERT DELAYED

Recommended Posts

When would be appropriate to add the "DELAYED" keyword to an insert? I am writing a traffic analysis system which logs info on every pageload and click thru and info is typically inserted by connecting once, inserting the data with one query, then disconnecting. Part of the info stored is the referrer string, which can be rather long sometimes (regularly over 1000 chars for one particular referrer). How busy would the site need to be to warrant using DELAYED on the inserts?

Share this post


Link to post
Share on other sites
There is some overhead to using DELAYED, since you're creating a second INSERT queue; however, it becomes much faster for bulk inserts because the client doesn't have to "wait" for the insert to finish before you can move on.  In other words, if your don't need to newly created ID back, then you can use delayed without a problem.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.