I'm putting together a website that has a book database, about 150,000 books.
Question - which is faster to find a book by author?
Select * from a big table that has all data about a book in one row where author = $query (about 21 columns, ISBN, author, publisher,pubdate,etc)
or
Select * from index table that only has 4 columns (ISBN, author, title,publisher) and then pull the other from bigtable based on ISBN?
My inclination is that a query through 150,000 rows is the same regardless of number of columns - but the other side of me looks at the much tinier file size and thinks that has to be faster.
Question - which is faster to find a book by author?
Select * from a big table that has all data about a book in one row where author = $query (about 21 columns, ISBN, author, publisher,pubdate,etc)
or
Select * from index table that only has 4 columns (ISBN, author, title,publisher) and then pull the other from bigtable based on ISBN?
My inclination is that a query through 150,000 rows is the same regardless of number of columns - but the other side of me looks at the much tinier file size and thinks that has to be faster.