PDA

View Full Version : Help me to optimize my database



pierrebenoit
12-27-2004, 02:45 PM
Hi all,

I am going to build many datafeed website and want some help about the database.
This is the structure to create a table:

CREATE TABLE products (
id int(11) NOT NULL auto_increment,
ProductID int(10) default NULL,
Name varchar(200) default NULL,
MerchantID varchar(150) default NULL,
Merchant varchar(150) default NULL,
Link varchar(250) default NULL,
Thumbnail varchar(250) default NULL,
BigImage varchar(250) default NULL,
Price int(5) default NULL,
RetailPrice int(5) default NULL,
Category varchar(150) default NULL,
SubCategory varchar(150) default NULL,
Description text,
Custom1 varchar(150) default NULL,
Custom2 varchar(150) default NULL,
Custom3 varchar(150) default NULL,
Custom4 varchar(150) default NULL,
Custom5 varchar(150) default NULL,
LastUpdated varchar(150) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;

** Can I optimize the sql code below so the information can take less place?

I have a choice:
1- One database per website with a products table
2- One database for many website (around 100) with 1 product table per website.

What is the way to go?

Thanks!

Chris
12-29-2004, 09:03 AM
I use 1 products table and add a mid (merchant id)

alien
12-29-2004, 10:22 AM
I use 1 database/products table per website.