I run an automated data collection service at work, which records measurements (temperatures, voltages, etc) from about a dozen sensors at a rate of about once a second. The MySQL database table looks like this fictitious example:
TABLE: recorded_measurements
**************************************
id sensor measurement timestamp
1 thermometer 75 1478360216
2 voltmeter 2 1478360216
3 ohmmeter 101 1478360216
4 thermometer 74 1478360217
5 voltmeter 2 1478360217
6 ohmmeter 103 1478360217
The real table is obviously more complicated, taking units and other details into account, but this MWE is enough to demonstrate my question.
Users query mostly by sensor and time window, e.g., Show me all voltages in the last 10 minutes or Get all temperatures and resistances from yesterday. Since there are hundreds of millions of rows and the table is queried frequently, we have indexed the timestamp and sensor columns.
A new group member is using my work to do something similar in another place, and has inherited most of my code. However, they have set their database table up differently:
TABLE: recorded_measurements2
****************************************
timestamp thermometer voltage ohmmeter
1478360216 75 2 101
1478360217 74 2 103
His reasoning is this makes querying by time window easier, since you just request all data within the desired bounds and filter out the columns wanted later (he actually has about 30 sensors). I feel like this is going to make querying more difficult in the long run, as well as incredibly slow once the table is populated enough, plus using the UNIX timestamp as "primary key" just seems horrible, although I'm having trouble expressing why.
My question is: is my coworker breaking any widely accept database storage principle, or am I just being one-track minded and adverse to an equally viable data storage solution? If it's the former, are there any seminal resources (papers, case studies, landmark blog posts) I can share to support my claim?