Yes, I am aware that data normalization should be my priority (as it is).
- I've got a table with 65 columns storing vehicle data with columns:
used_vehicle,color,doors,mileage,priceand so forth, in total 65. - Now, I can divide that and have a
Vehicletable,VehicleInterior,VehicleExterior,VehicleTechnical,VehicleExtra(all one-to-one with mainVehicletable).
Let's assume I'll have about 5 million rows (vehicles).
On SELECT with a WHERE clause: Will the performance be better searching through (both cases indexed at least on IDs):
Vehicletable with 65 columns orVehicletable withJOINSon four other tables (all with 5 million rows) to return all the data related toVehicle?
(As per database engine, consider PostgreSQL and/or MySQL).
Truly appreciate any detailed insights you might have from your previous experience?
Updates will be rare if any, and selects will be mostly for all columns (vehicle details page) and main info (few columns) for search results list, and in fact maybe the best solution would be two tables: one with main info (few columns) and the other table with rest of the columns.
VehicleInterior, other queries that deal with columns from onlyVehicleTechnical, etc. Or if there are many rows/vehicles that have absolutely no info about (for example)VehicleExtraso instead of many rows with lots of nulls in the one table, you have rows in the rest of the tables and no rows inVehicleExtra