Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about mysql

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i want to add cheat codes to my web site. but heres my problem. one game platform has well over 2000 games. i want to use columns in table for games, and rows for codes. just look at it this way: 2000+ games equals 2000+ colums plus 2000+ medium texts data types. this are also maybe another 1000 for other game systems.

if i do this would it severly do damage to my site/sql database? my site has 600mb of space (only using about 60), and we are allowed a max of 25000 GB of bandwidth a month.

thanks.
 
OK, I run a mysql database with approx 4,000,000 records, it uses about 13gig of hdd space and is an order management system (there are two main tables , one with 98 fields, the second with 30 ish.

Performance is not an issue, it runs just fine and returns results on average in 1.3 seconds for a full db search (moving platform soon to gain an extra 35-45% speed increase.

To preserve your bandwidth I'd suggest you use pages that will not send images with every page etc etc.

Really, it should be just fine although as you guess, mysql space is what you'll need to keep a close eye on.

Use varchar fields instead of mediumtext as varchar will only use the bytes used in the filed rather than the allocated size.

Example - field notes is mediumtext 255 chars, this will use 255bytes for every field, bad idea

notes is varchar 255, will only use the characters stored in each field (say it has the word test in, it uses 4 bytes.)
There is a slight overhead for each record but that will exist whatever the field type. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Ooooooo, no, no, no Mr.php_newbie!

I'm not sure quite what your db design is, but it sounds a bit dodgy! Your table should not be having 2000 columns for the games!! You should have a platform table, a games table, and a cheat codes table. Each should have a key field for the items in it. Then the cheat code table becomes:

fk_platform (a foreign key to the platform table)
fk_game (a foreign key to the games table)cheat_code

:)

Hugh Prior
Author of the world's best ;) and most local search engine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top