Hunting down bad code/ETL

  • LightVader (6/21/2016)


    Eric M Russell (6/20/2016)


    Jeff Moden (6/20/2016)


    Eric M Russell (6/20/2016)


    Jeff Moden (6/17/2016)


    As a bit of a sidebar and like anything else in SQL Server, saying something like the use of SELECT * always being bad is the wrong thing to say. If you need all columns from a wide table (lots of columns like some of the more ridiculous tables we have at work that have more than 100 columns), you'll frequently find that SELECT * is sometimes significantly faster than listing every bloody column in the code.

    Do you mean a faster execution plan at runtime, or it's just faster when coding by hand?

    Both.

    I guess it's kind of like when I'm ordering a Sub sandwhich, the type where one walks up to the bar and tells the server what all to put between two slices of footlong bread. I just say "Give me everything", which is a lot faster to say and probably easier for them than: "Lettuce, tomato, spinach leaves, bell pepper, pickels, cucumber, onion, spicy peppers, olives, salt, pepper, olive oil, mayonaise, ...". Sometimes when I walk in the door, they recognize me and have already started my order, which is kind of like a cached execution plan. 🙂

    As someone who's worked in food service (ice cream store), I don't like when people say give me a sundae with everything - everything is different for different people. Had the same problem with people say saying they'll have the same thing but they really only wanted the same size with a different flavor and a different topping. :crazy:

    I did have a bunch of customers that I knew the usual order for. I always questioned whether I should start their usual order right away or check first to see if they wanted something different.

    I would never order an ice cream with everything, because that could involve weird stuff like gummy bears or artificial colored syrup. However, I do order my subway sandwhich with everything, and I do mean everything. When it comes to vegatables, it's all good.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply