Suppose I have a website and for its database there is one table is
Table_name table_1 and attributes are like table_1(a1(primary key,a2,a3,a4,a5,a6,a7) and in my website for for most of transactions I only uses attributes (a1,a2,a3) but the a4,a5 ,a6 and a7 are rarely used so I want to know what is better design approach to access data from following option
A)keep this table as it is and use this query select a1,a2,a3 from table_1;
B) Create 2 separate table table1(a1,a2,a3) and table_2(a1,a4,a5,a6,a7)
which approch have lower cost or load on database?
For read querys over (a1, a2, a3), obviusly "b" is (not noticeably) cheaper.
But all the other things are worst except if (a4, a5, a6, a7) are, in most of cases, nulls and you used (1->0,1) cardinality between both tables (that is: for each a1 in table_1 there is 0 or 1 tuples with the same value of a1 in table_2 and, of course, all values of a1 in table_2 exists in table_1).
Anyway, as I said, any possible advantage will be minimal compared to the complexity, maintainability issues, and also efficiency reduction (for inserts and when you need data from both tables).
So, if I were you, I would select "a" layout without any doubt.