Marco wrote:
I was wondering which is fast making a single table with about 18 columns,
and each time select the columns that I want in the select query, this way I
would do less select queries.
Or is it better like I have 3 tables, and access 2 of them at the same time
most of the times?
There is no simple yes or no answer to it, it depends much about what
kind of queries you need to make and how many rows you are supposed to
have in each table.
For example:
If you have 100 000 rows in all tables, and all rows are linked 1 and
only 1 row in other tables, you propably would be better putting all in
one table.
Then again, if you have table with 100 000 rows and another table with
about 10 rows, and each row has a string that you want to do a query
like: select * from nametable where name like '%middletext%';
It would be faster to use different tables. Because if you would have 1
table, you would have to search all rows in it, because you couldn't
benefit from indexes. But when using two tables, you would find the
names by searching 10 rows and then you could use name_id in your larger
talbe, which would be of course indexed.
These are only two examples, but I hope you understant what I'm trying
to say: There is no simple answer to this question.