Are the posted questions getting worse?

  • GilaMonster (3/28/2014)


    Ed Wagner (3/28/2014)


    Grant - You have booth babes??? :w00t:

    Grant *is* the booth 'babe' 🙂

    Oh boy - I should have kept my mouth shut. Please, no pictures and nothing about boats.

  • Ed Wagner (3/28/2014)


    GilaMonster (3/28/2014)


    Ed Wagner (3/28/2014)


    Grant - You have booth babes??? :w00t:

    Grant *is* the booth 'babe' 🙂

    Oh boy - I should have kept my mouth shut. Please, no pictures and nothing about boats.

    Now we have boat babes and booth babes??? SCHWEET!!!

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean that is wrong? I usually get a dataset with the IDs. The for each row I call another procedure to loop through the columns. That way I get to maximize the number of queries being run. But it should be faster right because each query is really small. :w00t:

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sean Lange (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean that is wrong? I usually get a dataset with the IDs. The for each row I call another procedure to loop through the columns. That way I get to maximize the number of queries being run. But it should be faster right because each query is really small. :w00t:

    Of course that's wrong. You need to create a cursor to go through every detail row. Don't forget to use one variable for each field and one for each row.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Sean Lange (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean that is wrong? I usually get a dataset with the IDs. The for each row I call another procedure to loop through the columns. That way I get to maximize the number of queries being run. But it should be faster right because each query is really small. :w00t:

    This is what the ORM is for 😀

    I have seen that for updating 30 objects (two tables) into database, JPA generates 13 000 small queries. They could easily cut this half by doing update instead delete + insert, but still :w00t:

    Queries are like

    SELECT id FROM TABLEA WHERE (id = ?)

  • Luis Cazares (3/28/2014)


    Sean Lange (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean that is wrong? I usually get a dataset with the IDs. The for each row I call another procedure to loop through the columns. That way I get to maximize the number of queries being run. But it should be faster right because each query is really small. :w00t:

    Of course that's wrong. You need to create a cursor to go through every detail row. Don't forget to use one variable for each field and one for each row.

    Leave it to you to come with a better approach. I guess my afternoon will be busy now retrofitting my code for worse performance.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • And above all else, remember: Always nest your cursors at least three levels deep.

    Luis Cazares (3/28/2014)


    Sean Lange (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean that is wrong? I usually get a dataset with the IDs. The for each row I call another procedure to loop through the columns. That way I get to maximize the number of queries being run. But it should be faster right because each query is really small. :w00t:

    Of course that's wrong. You need to create a cursor to go through every detail row. Don't forget to use one variable for each field and one for each row.

  • Ville-Pekka Vahteala (3/28/2014)


    Sean Lange (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean that is wrong? I usually get a dataset with the IDs. The for each row I call another procedure to loop through the columns. That way I get to maximize the number of queries being run. But it should be faster right because each query is really small. :w00t:

    This is what the ORM is for 😀

    I have seen that for updating 30 objects (two tables) into database, JPA generates 13 000 small queries. They could easily cut this half by doing update instead delete + insert, but still :w00t:

    Queries are like

    SELECT id FROM TABLEA WHERE (id = ?)

    LOL. I have seen some seriously nasty stuff coming out of those supposed "faster, better, stronger" ORM "solutions".

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    I have already seen this done to populate an Excel workbook.

    Took about 6 hours to populate, and the developers complained that something was "wrong with the server".

    I pointed out that all of the data could be returned in a single result set, but they said they "didn't have time to fix it".

    I suggested that they could fix it in less time then it took to populate the workbook, but they never got around to it.

    FYI, I think this is the first time I ever posted on The Thread.

  • Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    You mean something like this??

    USE AdventureWorks2008R2;

    GO

    SELECT 'SELECT CustomerID,* FROM Sales.Customer where CustomerID = '+CAST(CustomerID as varchar) + ' Union All'

    FROM Sales.Customer

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Ed Wagner (3/28/2014)


    GilaMonster (3/28/2014)


    Ed Wagner (3/28/2014)


    Grant - You have booth babes??? :w00t:

    Grant *is* the booth 'babe' 🙂

    Oh boy - I should have kept my mouth shut. Please, no pictures and nothing about boats.

    That is such a perfect set up that I'm just going to assume it's a trap.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Michael Valentine Jones (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    I have already seen this done to populate an Excel workbook.

    Took about 6 hours to populate, and the developers complained that something was "wrong with the server".

    I pointed out that all of the data could be returned in a single result set, but they said they "didn't have time to fix it".

    I suggested that they could fix it in less time then it took to populate the workbook, but they never got around to it.

    Ummm errrm, what the ....?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Michael Valentine Jones (3/28/2014)


    Luis Cazares (3/28/2014)


    I'm a developer/programmer/moroff/slave and for that reason, I wonder why people like to overcomplicate things if they have the tools available. Next thing, I'll hear about someone making a select for each value in the table to show it on a grid.

    I have already seen this done to populate an Excel workbook.

    Took about 6 hours to populate, and the developers complained that something was "wrong with the server".

    I pointed out that all of the data could be returned in a single result set, but they said they "didn't have time to fix it".

    I suggested that they could fix it in less time then it took to populate the workbook, but they never got around to it.

    FYI, I think this is the first time I ever posted on The Thread.

    Sounds like a classic case of "we want right now, we don't care if it is right".

    And welcome to the thread. You have a few pages to read to get caught up. 😉

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • GilaMonster (3/28/2014)


    Ed Wagner (3/28/2014)


    Grant - You have booth babes??? :w00t:

    Grant *is* the booth 'babe' 🙂

    Heh... especially on kilt day. 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 43,486 through 43,500 (of 66,709 total)

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