.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   IMPORTANT ANNOUNCEMENT REGARDING PMs! (http://forum.shrapnelgames.com/showthread.php?t=39687)

Mindi July 17th, 2008 01:41 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
To tell you the truth, I don't think it's the size of the PMs themselves that is the issue, it's more about the total number of entries in the database that is the issue. They are a relational databse and therefore has to link various different tables and entries together for each PM and that slows down the import significantly.

I mean in theory we could have a more PMs than we have currently if every user had the limit I am imposing, but in reality it was less than 200 people who had more than 100 PMs with the top 10 people on the list taking up almost 20% of the PM database alone. Some people like to save every single PM including things like read receipts and the like at if you're going to be that much of a PM hoarder, you need to copy and paste them to a word document and save them on your own machine.

I was even guilty of saving too many moderation PMs for history's sake and although they are good to keep (so I know the history we've had with certain users), they don't have to be kept in their current form, so I saved them in a document and deleted them from the forum software.

douglas July 17th, 2008 03:07 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
I have no actual knowledge of how this particular database is set up, but that doesn't make much sense to me unless the database is poorly designed or certain kinds of redundant checking are involved. Is there, by any chance, a constraint that all PMs have to be unique to prevent accidental double-sending or some such? I could see that making an import take forever by forcing the database to compare each PM to all previous PMs before inserting it. If such a constraint does exist, removing it temporarily for the import should speed things up dramatically.

Mindi July 17th, 2008 03:35 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
I don't understand the full way that it is set up, I only know tid bits of what Richard has explained to me and I know UBB has a lot of backwards way of doing things so who knows. All I know is the import started out taking the better part of a whole day, Richard has done a lot of research and found a way to speed up the majority of the process, but the PMs database still takes 4-5 hours (as much as all of the other parts of the import combined) and last time it failed totally towards the end of the PM import.

Frankly we should have put some contraints around PMs before now, but it is what it is and we're dealing with it now.

douglas July 17th, 2008 03:39 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
I notice you mentioned in the Dom 3 forum that about 100000 PMs were taking longer than everything else put together. Considering there are over 5 times that many posts alone, plus the user list and various other data on top of that, I can't think of any reasonable explanation for it other than an index or constraint requiring excessive redundant checking.

My first guess would be that the PM content column has a unique constraint but no index, which would force a string comparison of each and every PM with each and every other PM. This isn't that big a deal in normal use when you only have to worry about one new PM at a time, but doing 100k at once takes forever. Removing the constraint in this case would drop the import time immensely. Creating an index for it instead would greatly reduce the number of comparisons required, but the index itself would take some extra resources to maintain. Assuming my guess is correct, I would first try creating an index for the column and see how much that helps. If it still takes too long, then remove the constraint entirely before importing and then see if it can be added back in a reasonable amount of time.

Edit: Then again, I don't know that much about how most databases handle indexes on strings specifically, so it's possible that it does have an index on PM content and that removing that index could help. I doubt this is the case, but it might be possible.

Mindi July 17th, 2008 04:57 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
Like I said, I don't know all the finer points of this sort of thing. I do know what Richard did to speed up the main part of the import was to take off the indexing, but I don't think the PMs work the same way and we still haven't figured out what the total time will be once we put the index back on at the end because we haven't had a complete, successful import to try it on yet since the PM part failed last time.

I don't really like talking about all of this because it's not my area of expertise and I only know a little bit about everything Richard is doing. He's the back end, I'm the one putting in modifications, tweaking settings, importing smilies, etc.

gregebowman July 21st, 2008 01:22 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
For someone who's still has one foot in the 20th century, what the heck is a PM?

Ed Kolis July 21st, 2008 01:30 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
Private message http://forum.shrapnelgames.com/images/smilies/happy.gif

Fyron July 21st, 2008 01:31 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
"Private Messages" existed for much of the latter decade of the 20th century. http://forum.shrapnelgames.com/images/smilies/wink.gif

narf poit chez BOOM July 21st, 2008 01:52 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
...So less than 10%?

Azselendor July 23rd, 2008 10:25 PM

Re: IMPORTANT ANNOUNCEMENT REGARDING PMs!
 
Oh, you are all very very wrong.

Private Messages have existed for as long as there has been children passing private messages in class. This of course was always accompanied by the Department of Homeland Security - formerly known as Teachers - whom would intercept and read them randomly and to your embarrassment.


All times are GMT -4. The time now is 06:30 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.