From: Matthew M. <ma...@tu...> - 2006-03-28 15:46:37
|
On Mon, 2006-03-27 at 19:06 -0500, Eloi George wrote: > Will there be a problem 2 years down the road when we start having sites > with 500,000 key records? How much longer will it take to search the > Key table then? 500,000 times longer than if there was just one record ;-) Seriously, I'm not sure. However, this table is indexed by the id and modules using the key class keep this value in their own table. That should be the only column searched on a regular basis. I am certainly not an expert on optimization, but it would seem faster to have one table of items than several tables with duplicate information. > Is there a way we can decrease the indexing space requirements for the > "module" field? Internal integer-based moduile ids? Using an > enumeration field? (well, that would be pretty much the same thing) This would be a huge change and set me back a ways. Many processes depend on the module title and I would have restructure the program to use an integer index instead. > Why are we not using the user ids of the author & editors? I think we > should because I've had to change the usernames of 3 people over the > last 2 years, and it was a very long process. I think it breaks some > sort of database normilization rule as well. Two reasons I did it this way. First, if I store the id, I have to join with the users table to grab the display name. Not a big deal, but it is certainly easier for developers to just have that information local. Second, I was worried about deleted users. If a user has been removed, their name will still be associated with the key. With an id, I would get a FALSE when trying to pull the display name. I can change it, but then getting the display name would require an extra database query per key listing. I am open to discussing options. For example, perhaps just adding creator_id and updater_id columns? Thanks for the feedback Eloi, Matt -- Matthew McNaney Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |