Hi, I have question about database optimizing, indexing. I have table that called "projects" and i will execute queries like this:
Ordering Queries
SELECT * FROM projects WHERE active = 1 ORDER BY created
SELECT * FROM projects WHERE active = 1 ORDER BY project_deadtime
SELECT * FROM projects WHERE active = 1 ORDER BY project_allowedtime
My Table Stucture Like This
id int(11) NO PRI NULL auto_increment
employer_id int(11) NO MUL NULL
project_title varchar(100) NO MUL NULL
project_description text NO NULL
project_budget int(11) NO NULL
project_allowedtime int(11) NO NULL
project_deadtime date NO NULL
created datetime NO MUL NULL
active tinyint(1) NO MUL NULL
Which columns should i create index and how(single or multiple column index ?). For example should i use active-created & active-project_deadtime & active-project_allowedtime multiple indexes or single active index is enough ? Thanks
EDIT: projects table will have maximum 1000-2000 rows. SELECT queries performance is important and about %90 of projects is active.