1

I designed an sqlite database with 2 tables. I did this because i tought that it's not recommanded to insert many columns in a single table. in table 1 I have more than 40 columns, and in table 2 +10 columns Now, when i use the database, i have to do an INNER JOIN to find all fields from the 2 tables.

My question is : Is it better to perform a join between the 2 tables, or create only one table with all the fields (at the end, more than 60) ?

This second option will save an INNER JOIN, so i guess this will speed up the query

Dany M
  • 760
  • 1
  • 13
  • 28
  • What do you need those 50 columns for? – CL. Apr 30 '18 at 16:24
  • it store one to one data. I'm using it to create an html table "searchable" from it table. as i split the data into 2 tables, i have to do a join – Dany M May 02 '18 at 08:41

1 Answers1

1

It is better to create different tables because it is easily maintainable as well as it is a good practice. Similar answer you can find Here.

Sulthan
  • 354
  • 3
  • 19
  • thanks for this link, very interesting. I have a 1to1 relation between tables, according to your links, there is no benefits spliting the datas. what about performance (speed)? – Dany M May 02 '18 at 08:42