Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004

    Unanswered: SELECT * vs. SELECT field1, field2, etc.

    This may be a more general question but I love SQL Server so Ill pose it here. I couldnt find this answer on google so that why Im asking. I was never taught (or I was too high to retain the info) form college in my one DB class.

    What are the performace impacts, if any, on doing a "SELECT * FROM table" vs. "SELECT each, column, called, out, but, not, all, of, them FROM table" ?

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    Less network traffic because only the data you need is being returned. But the big benefit comes from having code that is easy to read and debug, and that doesn't crash if you add/delete/reorder the columns in your table.

    "SELECT *" is just sloppy and lazy, and has no place in production code.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

  3. #3
    Join Date
    Sep 2004
    Is there a SQL command to get the size in bytes of a returned recordset? Something like:

    SELCT SIZE(*) FROM Table

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts