Jump to content

When to use INSERT DELAYED


king arthur

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?
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.