1
If I need all fields in the table, there is a difference in performance between using the joker "*" (SELECT * FROM ...
) and specify all fields in the table (SELECT campo1, campo2... FROM ...
)?
Beyond performance, what is good practice?
1
If I need all fields in the table, there is a difference in performance between using the joker "*" (SELECT * FROM ...
) and specify all fields in the table (SELECT campo1, campo2... FROM ...
)?
Beyond performance, what is good practice?
Browser other questions tagged sql database
You are not signed in. Login or sign up in order to post.
The answer is already here: https://answall.com/questions/232219/m%C3%A9all-individual-or-parameter-in-query-mysql
– 13dev
@Diegomarques Check my reply on the link that 13dev posted. It takes care of exactly that.
– Godfrey the King
My doubt is restricted exactly in the situation of the need to bring all fields of the table, from what I understood in this answer, is for when I will need only a few fields, so I specify them.
– Diego Marques
Why using "SELECT * FROM table" is bad?
– rray
this @rray mentioned covers everything you need
– 13dev
depends also on how your application treats "all fields" if it is automatic you can use * but if you have to have some maintenance if any new field is create better list fields
– Motta