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
  #1  
Old 06-25-2006, 03:58 AM
sesmar
I built it I will Support it!
 
Join Date: Jun 2005
Location: Michigan
Posts: 214
Default MySql Database issues

Does anyone else have trouble running what seems to be simple queries in MySql?

I going through and trying to clean up some stuff in the datbase. Particularly faction tables right now. My Problem is that any of the queries that I want to run to give me the information I need just lock up my server. These queries are really simple and should not have this effect esp when I am able to run what seems to be more complicated queries.

For example:

Code:
SELECT
  npc_faction_id,
  npc_faction.name
FROM
  npc_types
  INNER JOIN spawnentry
    ON npcID=npc_types.id
  INNER JOIN spawn2
    ON spawnentry.spawngroupID=spawn2.spawngroupID
  INNER JOIN  npc_faction
    ON npc_faction.id=npc_types.npc_faction_id
WHERE
  spawn2.zone='qeynos'
GROUP BY
  npc_faction_id,
  npc_faction.name
This query will run with out a problem at all. but if I try and run this:

Code:
SELECT
  npc_faction.id,
  npc_faction.name
FROM
  npc_faction
  LEFT JOIN npc_types
    ON npc_types.npc_faction_id=npc_faction.id
WHERE
  npc_types.id IS NULL
It will lock up my server.

But I can run this query which is the same type of concept:

Code:
SELECT
  id,
  name
FROM
  faction_list
  LEFT JOIN npc_faction_entries
    ON faction_id=id AND npc_faction_id = 2613
WHERE
  npc_faction_id IS NULL
ORDER BY
  name
I have tried doing some searching on the internet but can not find anything as to the cause of this. I have tried this on MySql 4 and 5 and have had problem with other queries as well. Usually they have something to do with LEFT or RIGHT JOINS looking for NULL values. Any information on this would be appreciated
__________________
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 02:23 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