Query takes too long - Indexing required?

Just to emphasise what JamesK said:

If you do SELECT * and the APP doesn't actually need all the columns, then you are sending ALL the columns over the wire, and the APP is ignoring some of them.

If some/all of the ones ignored are large text columns that will slow down the transmission A LOT. And, worse, if someone adds a huge text column to that table in the future any query using SELECT * which used to preform well will become a dog. And it will take A LOT of effort to fix them all at that time. Moral: Don't use SELECT *, specifically name all columns required.

Might be that you just put SELECT *in the example code for the purposes of this post though :slightly_smiling:

1 Like