Why is it a bad idea to use SELECT * instead of specifying the required columns by their name?

Consider the following table structure.

mysql> DESCRIBE TEST;

Why is it a bad idea to use SELECT * instead of specifying the required columns by their name?

Consider the following table structure.

mysql> DESCRIBE TEST;

Why is it a bad idea to use SELECT * instead of specifying the required columns by their name?

A.
SELECT * may cause more data to be to be read from disk if your application only needs some columns.

B.
SELECT * causes more data to be sent over the network if your application only needs some columns.

C.
SELECT * prevents the use of indexes, so a full table scan is required for every query.

D.
SELECT * causes your application to depend on the columns present when you wrote it, so your application could break if new columns are added to the table structure



Leave a Reply 0

Your email address will not be published. Required fields are marked *