Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Database/World Building

Archive::Database/World Building Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2003, 12:09 AM
syntoad
Fire Beetle
 
Join Date: Feb 2003
Location: Columbus, OH
Posts: 25
Default Suggestions to make .sql files more efficient

If you make a database that is supposed to override previous databases, it's probally best to use REPLACE instead of INSERT, that way it will actually overwrite the info that is already there (and not give you back so many errors.)

And while I'm at it, it is also desirable to use a multipule insert statement, as it will execute much faster than a lot of inserts.

For example:
Code:
INSERT INTO items VALUES (1001, 'item1001'),
INSERT INTO items VALUES (1002, 'item1002'),
INSERT INTO items VALUES (1003, 'item1003');
becomes:
Code:
REPLACE INTO items VALUES (1001, 'item1001'),
 (1002, 'item1002'),
 (1003, 'item1003');
This should make db upgrades easier and faster.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:18 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3