How To optimize a database ?

Thierry Nauze ohmitou at wanadoo.fr
Wed Dec 7 10:38:17 CST 2005


Hello,

I have a DBbase with several tables from which one is more often  
requested than the others

Main table  t1:
  id 		A		 B		 C		...

And here is a secondary table t2 :
id 		t1_id 	D 		E	

To obtain data A, B and D knowing t1.id, I need two requests SQL.


I have to try to optimize situation by modifying the structure of the  
base

AFTER the modification, I have main Table t1
id 		A		B		 C 		D		...

A single request is then necessary with a more simple code...


And ... result is contrary to my expectations ! Where is the problem ?

Question: is it preferable to have several tables with few columns or  
a single table with many columns?
That is not maybe impossible!

Regards,


--
Thierry NAUZE        Saint-Denis de la Réunion




More information about the Valentina mailing list