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

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 10-05-2019, 01:10 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

If you prefer INNER JOINs...

Code:
SELECT `a`.`zone` FROM `spawn2` `a`
INNER JOIN `spawnentry` `b` ON `b`.`spawngroupID` = `a`.`spawngroupID`
INNER JOIN `npc_types` `c` ON `c`.`id` = `b`.`npcID`
INNER JOIN `loottable_entries` `d` ON `d`.`loottable_id` = `c`.`loottable_id`
INNER JOIN `lootdrop_entries` `e` ON `e`.`lootdrop_id` = `d`.`lootdrop_id`
INNER JOIN `items` `f` ON `f`.`id` = `e`.`item_id`
AND `f`.`id` = '10400' # `f`.`id` IN (...)
GROUP BY `a`.`zone`
ORDER BY `a`.`zone`;
Code:
SELECT `a`.`name` FROM `npc_types` `a`
INNER JOIN `loottable_entries` `b` ON `b`.`loottable_id` = `a`.`loottable_id`
INNER JOIN `lootdrop_entries` `c` ON `c`.`lootdrop_id` = `b`.`lootdrop_id`
INNER JOIN `items` `d` ON `d`.`id` = `c`.`item_id`
AND `d`.`id` = '10400' # `d`.`id` IN (...)
INNER JOIN `spawnentry` `e` ON `e`.`npcID` = `a`.`id`
INNER JOIN `spawn2` `f` ON `f`.`spawngroupID` = `e`.`spawngroupID`
AND `f`.`zone` = 'mesa'
GROUP BY `a`.`name`
ORDER BY `a`.`name`;

I saw no difference in query time myself...


Note: Global items have changed in the way they are handled and no longer appear in loot tables. (Any remnants will eventually be taken out.)
__________________
Uleat of Bertoxxulous

Compilin' Dirty

Last edited by Uleat; 10-05-2019 at 01:28 AM..
Reply With Quote
 


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 04:16 PM.


 

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