If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Help with DB design for events in an MMO game

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-23-08, 17:35
torncanvas torncanvas is offline
Registered User
 
Join Date: May 2008
Posts: 1
Exclamation Help with DB design for events in an MMO game

I'm currently working on an MMO and need help designing a database for logging events during games. When an event occurs, it happens in a particular region of a particular map at a particular time, by a particular player.

We've been pretty concerned about DB size and performance, since there could be up to a couple million players, millions of games, and thousands of events per game.

We've decided to make things easier by grouping the stats together into chunks of time and space, that way we can reduce size and still get some sort of use out of the data.

So far we have these fields for our Events table:

MapID - which map
MapRegion - which linear section of the map
TimeRegion - which moment in time
EventType - what event occurred
Count - how many times this happened

However, performance for updating the Count is terrible. For ~200 random events on a map 20 map regions wide with 10 kinds of events in one time region, updating the database took 10.396 seconds. This is with optimal grouping, meaning that event count increments are grouped as much as possible for update cycles.

The worst part of all is that we'd like to have maybe 150 map regions wide with 20-30 kinds of events.

Is there a better way to do this? Should we not group things like this and capture more raw data instead? Is a DB even the right thing to use in this case?
Reply With Quote
  #2 (permalink)  
Old 05-26-08, 13:13
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by torncanvas
We've been pretty concerned about DB size and performance
I think you are already realising this but database size and performance are not simply inversly related.

Quote:
Originally Posted by torncanvas
We've decided to make things easier by grouping the stats together into chunks of time and space, that way we can reduce size and still get some sort of use out of the data.
What is the use you want to make of the data?

What are the performance requirements? For example, do you need to store this data as quickly as possible? Do you need to retrieve data in real time or are you looking for summaries?

Also - what RDBMS are you using?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On