I'm building a program that stores news headlines for companies and its timestamp from various sources.
Let's say the number of company is 1000. It goes like Apple, Google, Microsoft.. etc.
So I can think about two options.
One table with numerous rows (above code is just an example).
CREATE TABLE news ( news_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, company VARCHAR(10) NOT NULL, timestamp TIMESTAMP NOT NULL, source TEXT NOT NULL, content TEXT NOT NULL, ... ) // I also can make company and timestamp as primary keys, and news_id will be unique key.*
1000 Tables
CREATE TABLE news_apple // and news_google, news_microsoft, news_...(x 1000) ( news_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, timestamp TIMESTAMP NOT NULL, source TEXT NOT NULL, content TEXT NOT NULL, ... )
Most of the time, I will find the news for the certain company. Let's say there are more than 10000 news for each company. I wonder that if I use a 'WHERE' clause in the first option, it would be slower than the second option.
Which one is more efficient in terms of performance and why?