• Mr. AHole DBA Guy (unregistered) in reply to Frist
    Frist:
    Mr. AHole DBA:
    not an anon:
    Mr. AHole DBA:
    garaden:
    Chubber:
    We need an expert who does this for a living to review it with a critical eye and make sure it's the way it needs to be!

    Those sound like they are trying to get a data architect to "review" what should have been done up front.

    Yeah, TRWTF is waiting four months to even start reviewing with a DBA. Of course, turns out he's waiting until the heat death of the universe, but oh well.

    Where I work all DDL must go through the data team, which makes sense to me, and definitely encourages people to bring them into the design process sooner rather than later. Waiting too long for review is a great way to have to make drastic changes late in your feature's development.

    Wish they wouldn't insist on using stored procs everywhere, though.

    Sorry bud, but we really do need to insist on stored procs everywhere mainly for 2-3 reasons:

    1- Compliance. Almost any compliance doc out there will require you to reduce the exposure to the various types of SQL Injection attacks, and by proxy, almost all of them require you to use stored procs to do this.

    2-Performance, cache plan invalidation, excessive memory usage, nasty parameter sniffing and all other kinds of anomalies do show up when we don't use proper stored procedures. Add that with using it on a heap of a table instead of a clustered indexed one, and your chances of hitting a nasty performance issue skyrockets.

    Stored procedures have nothing to do with such things, sadly. It's quite possible to leave your rump bare to SQLi inside a sproc (I had to deal with a case recently where I had to generate dynamic SQL w/o bind params in a sproc due to dynamic table names shivers; at least I don't have to worry about them coming directly from user input), and it's also quite possible to write clean, safe, performant SQL in a database that doesn't even have stored procedures, simply by using bind params in your embedded SQL. Perhaps you should spend a weekend or two with SQLite to refresh yourself on the basics?

    CAPTCHA: decet - Any decet DBA will know bind params vs stored procs.

    Really cute attempt to talk like a DBA but it failed.

    Like it or not the reality of the situation is as I stated: Security compliance almost always requires you to use stored procedures, and their driver for that is security. Go pull up a list of sec requirements for 'at rest data management and access' to see for yourself.

    When you have to talk to business owners, C level execs, auditors, etc. you will see that like it or not, they will insist on it. Period. End of story. If you attempt to go around it the red tape needed to explain it, and find an auditor that cares is not worth it. BUT Hey it's your environment, YOU get to do what YOU want to do. Just don't come near my machines with that attitude.

    Sure some developer experienced enough could work around the proper steps of the solution, but why? Why pay someone to go 'around' an issue that the engines are optimzied for? So what if it can be done, should it be done? Answer is rarely yes, and even in cases like LinQ the justification is rare.

    Sure some idiot could still expose himself to sql injection attacks even in a sproc, but again, why? Why would you ever, ever hire that person? Blocking several kinds of SQL injection attacks by using proper paramaterized stored procedures puts you at such a huge advantage that I don't know why it would ever be advocated against, nevermind the compiled plans performance and memory usage; but I wouldn't expect a developer to care about that.

    This has got to be a troll.

    Because talking to an auditor or reading any major security compliance guideline to validate is so difficult?

  • not an anon (unregistered) in reply to Mr. AHole DBA
    Mr. AHole DBA:
    not an anon:
    Mr. AHole DBA:
    garaden:
    Chubber:
    We need an expert who does this for a living to review it with a critical eye and make sure it's the way it needs to be!

    Those sound like they are trying to get a data architect to "review" what should have been done up front.

    Yeah, TRWTF is waiting four months to even start reviewing with a DBA. Of course, turns out he's waiting until the heat death of the universe, but oh well.

    Where I work all DDL must go through the data team, which makes sense to me, and definitely encourages people to bring them into the design process sooner rather than later. Waiting too long for review is a great way to have to make drastic changes late in your feature's development.

    Wish they wouldn't insist on using stored procs everywhere, though.

    Sorry bud, but we really do need to insist on stored procs everywhere mainly for 2-3 reasons:

    1- Compliance. Almost any compliance doc out there will require you to reduce the exposure to the various types of SQL Injection attacks, and by proxy, almost all of them require you to use stored procs to do this.

    2-Performance, cache plan invalidation, excessive memory usage, nasty parameter sniffing and all other kinds of anomalies do show up when we don't use proper stored procedures. Add that with using it on a heap of a table instead of a clustered indexed one, and your chances of hitting a nasty performance issue skyrockets.

    Stored procedures have nothing to do with such things, sadly. It's quite possible to leave your rump bare to SQLi inside a sproc (I had to deal with a case recently where I had to generate dynamic SQL w/o bind params in a sproc due to dynamic table names shivers; at least I don't have to worry about them coming directly from user input), and it's also quite possible to write clean, safe, performant SQL in a database that doesn't even have stored procedures, simply by using bind params in your embedded SQL. Perhaps you should spend a weekend or two with SQLite to refresh yourself on the basics?

    CAPTCHA: decet - Any decet DBA will know bind params vs stored procs.

    Really cute attempt to talk like a DBA but it failed.

    Like it or not the reality of the situation is as I stated: Security compliance almost always requires you to use stored procedures, and their driver for that is security. Go pull up a list of sec requirements for 'at rest data management and access' to see for yourself.

    When you have to talk to business owners, C level execs, auditors, etc. you will see that like it or not, they will insist on it. Period. End of story. If you attempt to go around it the red tape needed to explain it, and find an auditor that cares is not worth it. BUT Hey it's your environment, YOU get to do what YOU want to do. Just don't come near my machines with that attitude.

    Sure some developer experienced enough could work around the proper steps of the solution, but why? Why pay someone to go 'around' an issue that the engines are optimzied for? So what if it can be done, should it be done? Answer is rarely yes, and even in cases like LinQ the justification is rare.

    Sure some idiot could still expose himself to sql injection attacks even in a sproc, but again, why? Why would you ever, ever hire that person? Blocking several kinds of SQL injection attacks by using proper paramaterized stored procedures puts you at such a huge advantage that I don't know why it would ever be advocated against, nevermind the compiled plans performance and memory usage; but I wouldn't expect a developer to care about that.

    1. Try a SELECT * FROM :tbl; on your favorite database, where :tbl is a bind parameter bound to the name of some table you have handy. Then, stare down a wishing-well for a while. (You'll probably find me staring down that same wishing-well, too.)
    2. Keep in mind that a SQL RDBMS is well within its rights to not implement stored procedures at all. SQLite, the most widely deployed SQL implementation on this planet considering that it's in web browsers, smartphones, and all sorts of other places where you'd never expect a DBMS to turn up, doesn't bother with stored procs. And if you say 'real men ALWAYS use Oracle, no matter what the situation or the data', I'll challenge you to make an Oracle instance run at all on a bare-metal ARM Cortex-M with 1MB Flash and oh, 256KB of on-chip SRAM, along with a SD card (via SPI) instead of a disk. Like it or not, there are systems that need to take a database with them into places where your garden-variety client-server RDBMS can't go, or is inappropriate. (Imagine if Firefox required a database server running just to work.)

    CAPTCHA: acsi - the ANSI SQL committee got all acsi about the idea of bind parameters in FROM clauses.

  • Mr. AHole DBA Guy (unregistered) in reply to jugis
    jugis:
    Mr. AHole DBA:
    Blocking several kinds of SQL injection attacks by using proper paramaterized stored procedures puts you at such a huge advantage that I don't know why it would ever be advocated against
    So what's wrong with using proper parametrised queries that block SQL injection attacks in exactly the same way? (Except for "my shitty DMBS doesn't have them", but even MySQL does so that would be surprising.)

    ---Again, why do that if your engine already supports stored procedures with a more robust execution plan engine, such as MS SQL Server? stored procs are also easier to manage than globs of text in code. How about granularity of access to objects? Do you want to grant users access to a stored proc or to all the supporting tables?

    Mr. AHole DBA:
    nevermind the compiled plans performance and memory usage; but I wouldn't expect a developer to care about that.
    Again, that depends on the DBMS. In a reasonable one, a prepared statement supplied by the client will be compiled in exactly the same way as statement executed from inside a stored procedure. But I strongly suspect that you're not talking about a DBMS that I'd consider remotely reasonable.

    Code with proper parameters where the engine doesn't have to try to sniff it out that is true. If you're going to go that far though, just make it into a stored procedure at that point, doesn't make sense not to.

  • (cs)

    This was explained here in much detail.

  • Valued Service (unregistered) in reply to Severity One
    Severity One:
    It basically shoots down everything it perceives as a threat to the naval vessel it's mounted on, completely autonomously.

    "That's not a target. That's Church." "Target locked" "What? No. Target unlock. Unlock! Please help me nice lady."

  • (cs)

    But at the other end of the Talent Ladder (7), the incompetence can be astounding even compared to the wobbliest software engineer. A couple of steps up from the bottom rung, you may as well be dealing with a robot. He can enter and run the commands he is given, without question or comprehension, but that is all. Setting up a piece of kit is akin to driving the Mars Rover. Transmit an instruction from Mission Control and 20 minutes later you get back a grainy, blurred report of what actually happened. If you directed it down a ravine, there it will be in bits. Same with Sys Admin Robot Boy. If you tell him to run a query which deletes every single record from the main transaction table, that is exactly what he will do. If you told him to squirt mayonnaise in his hair and go and sit in the broom cupboard, he would have done that too, so long as you had filled in an ITILS-compliant change ticket for same and had it approved by the appropriate authorities.

    At the absolute bottom of the Talent Barrel, the chap won’t even be able to copy and paste reliably. What you get, in effect, is a hopelessly inept copy typist and the results can be catastrophic. You have, say, been testing the system for a day or two and getting all sorts of inexplicable errors. One of the developers then figures out what is wrong: only about a third of the upgrade script has been run. No-one can work out why this should be until someone chances to open said script in Notepad. It is just over three screens long. The piece that was run by Clueless Database Administrator is precisely that which is visible when you first open the file (8). And now you pine for the return of Sys Admin Robot Boy.

  • (cs)

    Systems Managers.

    Scum. Bullying, bureaucratic, arrogant, idle, shirking, duplicitous, pig-ignorant thugs, every man jack of ‘em, almost without exception. Three out of a hundred do not confirm to this pattern and are instead charming but fabulously slippery spivs who are so Teflon-coated, oily and elusive that getting accountability, guilt or a piece of work to stick to them is as difficult as coating a live eel with a layer of greased jelly using tweezers.

    But your mainstream bullet-headed redneck Data Centre despot has no use for such subtlety. He doesn’t avoid conflict, he looks for it. He revels in it. He loves to say No. And he will say No, any time you want to do anything on his precious bleeding server farm. You want a new server built. No – the capacity planning process hasn’t identified a need. You want to install some software. No – it isn’t included on the approved build list. You want to move files from one server to another. No – Data Protection concerns. You want to add one line to a config file. No – no test cases, no backout plan, no evidence whatsoever of adherence to Change Management best practice. You want a new firewall rule so that our server can talk to someone else’s. You know, so we can exchange data so we can maybe do work and perhaps eventually get paid. Nay, Nay and Thrice Nay – connection across the internet ? To a third-party server ? Alien data entering and polluting the essential purity of our sanctified Data Centre ? Are you stark staring mad ? Have you not read the 308 blessed pages of our Corporate Information Management Protocol ?

  • Caboose (unregistered) in reply to Valued Service
    Valued Service:
    Severity One:
    It basically shoots down everything it perceives as a threat to the naval vessel it's mounted on, completely autonomously.

    "That's not a target. That's Church." "Target locked" "What? No. Target unlock. Unlock! Please help me nice lady."

    +1

  • (cs) in reply to Valued Service
    Valued Service:
    Severity One:
    It basically shoots down everything it perceives as a threat to the naval vessel it's mounted on, completely autonomously.

    "That's not a target. That's Church." "Target locked" "What? No. Target unlock. Unlock! Please help me nice lady."

    Oh man, that brings me back.

  • Mike (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    Watson:
    foxyshadis:
    Those aren't DBAs. They're sysadmins (or BOFHs) giving themselves a fancy name. Good work on convining a company that a title means the opposite of how the rest of the world uses it, though.
    I've seen companies where the word "backend" referred to the front end...
    I once worked for a company where "big" was a noun, and "66" was a verb.
    I have a strong suspicion that all of us - including the submitter of TFA - are talking about the same company, where I'm working now. Small world... or disproportionate source of WTFs?
  • (cs) in reply to MrBester
    MrBester:
    For those who don't know, a GAU-8 is the tankbusting nose gun on a Fairchild Thunderbolt (Warthog). It is codenamed "The Avenger" and shoots milk bottle (UK, a pint) sized rounds of depleted uranium at 3,600 rounds per minute. The recoil is enough to send a Warthog into a stall if you're flying a bit too casual.
    Obligatory what-if-xkcd.
  • kjsrutlnioreutirutoi (unregistered)

    The A is for ADMIN not ANALYST.

  • TeatimeOfSoul (unregistered)

    "...there is a procedure for everything, and everything has a procedure. The fundamental premise is that everything should be automated."

    Sounds like heaven to me. Can I go work there right now?

  • (cs) in reply to not an anon
    not an anon:
    Mr. AHole DBA:
    not an anon:
    Mr. AHole DBA:
    garaden:
    Chubber:
    We need an expert who does this for a living to review it with a critical eye and make sure it's the way it needs to be!

    Those sound like they are trying to get a data architect to "review" what should have been done up front.

    Yeah, TRWTF is waiting four months to even start reviewing with a DBA. Of course, turns out he's waiting until the heat death of the universe, but oh well.

    Where I work all DDL must go through the data team, which makes sense to me, and definitely encourages people to bring them into the design process sooner rather than later. Waiting too long for review is a great way to have to make drastic changes late in your feature's development.

    Wish they wouldn't insist on using stored procs everywhere, though.

    Sorry bud, but we really do need to insist on stored procs everywhere mainly for 2-3 reasons:

    1- Compliance. Almost any compliance doc out there will require you to reduce the exposure to the various types of SQL Injection attacks, and by proxy, almost all of them require you to use stored procs to do this.

    2-Performance, cache plan invalidation, excessive memory usage, nasty parameter sniffing and all other kinds of anomalies do show up when we don't use proper stored procedures. Add that with using it on a heap of a table instead of a clustered indexed one, and your chances of hitting a nasty performance issue skyrockets.

    Stored procedures have nothing to do with such things, sadly. It's quite possible to leave your rump bare to SQLi inside a sproc (I had to deal with a case recently where I had to generate dynamic SQL w/o bind params in a sproc due to dynamic table names shivers; at least I don't have to worry about them coming directly from user input), and it's also quite possible to write clean, safe, performant SQL in a database that doesn't even have stored procedures, simply by using bind params in your embedded SQL. Perhaps you should spend a weekend or two with SQLite to refresh yourself on the basics?

    CAPTCHA: decet - Any decet DBA will know bind params vs stored procs.

    Really cute attempt to talk like a DBA but it failed.

    Like it or not the reality of the situation is as I stated: Security compliance almost always requires you to use stored procedures, and their driver for that is security. Go pull up a list of sec requirements for 'at rest data management and access' to see for yourself.

    When you have to talk to business owners, C level execs, auditors, etc. you will see that like it or not, they will insist on it. Period. End of story. If you attempt to go around it the red tape needed to explain it, and find an auditor that cares is not worth it. BUT Hey it's your environment, YOU get to do what YOU want to do. Just don't come near my machines with that attitude.

    Sure some developer experienced enough could work around the proper steps of the solution, but why? Why pay someone to go 'around' an issue that the engines are optimzied for? So what if it can be done, should it be done? Answer is rarely yes, and even in cases like LinQ the justification is rare.

    Sure some idiot could still expose himself to sql injection attacks even in a sproc, but again, why? Why would you ever, ever hire that person? Blocking several kinds of SQL injection attacks by using proper paramaterized stored procedures puts you at such a huge advantage that I don't know why it would ever be advocated against, nevermind the compiled plans performance and memory usage; but I wouldn't expect a developer to care about that.

    1. Try a SELECT * FROM :tbl; on your favorite database, where :tbl is a bind parameter bound to the name of some table you have handy. Then, stare down a wishing-well for a while. (You'll probably find me staring down that same wishing-well, too.)
    2. Keep in mind that a SQL RDBMS is well within its rights to not implement stored procedures at all. SQLite, the most widely deployed SQL implementation on this planet considering that it's in web browsers, smartphones, and all sorts of other places where you'd never expect a DBMS to turn up, doesn't bother with stored procs. And if you say 'real men ALWAYS use Oracle, no matter what the situation or the data', I'll challenge you to make an Oracle instance run at all on a bare-metal ARM Cortex-M with 1MB Flash and oh, 256KB of on-chip SRAM, along with a SD card (via SPI) instead of a disk. Like it or not, there are systems that need to take a database with them into places where your garden-variety client-server RDBMS can't go, or is inappropriate. (Imagine if Firefox required a database server running just to work.)

    CAPTCHA: acsi - the ANSI SQL committee got all acsi about the idea of bind parameters in FROM clauses.

    Or an embedded system without a file system.

  • Ol' Bob (unregistered)

    And this is unusual in just what way? I've never worked anyplace where DBA's actually reviewed designs, code, tablespace assignments, or etc blah. They're concerned with making sure the backups run, and...um...let me get back to you on that...

  • Frist (unregistered) in reply to Mr. AHole DBA Guy
    Mr. AHole DBA Guy:
    Frist:

    This has got to be a troll.

    Because talking to an auditor or reading any major security compliance guideline to validate is so difficult?

    Because mandating that all SQL be written in sproc form causes more problems than it solves. For most modern SQL servers the perf difference is negligible (assuming parameterized queries). However you rapidly increase the surface area of your API. A single table will end up with tens of sprocs ranging from "GetFooById" to "GetFooOrderedByBarThenBaz" and "GetFooJoinedOnQuxByQuxId" etc etc. Sure...in theory they are more "secure". But the ability to audit your access becomes a case of auditing access to your 2000 sprocs on your 10 table database.

    Then when your new developer joins, they need to learn the API you have created that is the huge number of sprocs (as opposed to some kind of common Structured Query Language, that consists of known keywords like "SELECT" and "WHERE"). Naturally they find that the sproc doesn't QUITE do what they want, and they add another...causing another storm of auditing to occur.

    Finally you find that you have to add a column to your tables...cue going through each and every one of those 2000 sprocs!

  • Mr. AHole DBA Guy (unregistered) in reply to Frist
    Frist:
    Mr. AHole DBA Guy:
    Frist:

    This has got to be a troll.

    Because talking to an auditor or reading any major security compliance guideline to validate is so difficult?

    Because mandating that all SQL be written in sproc form causes more problems than it solves. For most modern SQL servers the perf difference is negligible (assuming parameterized queries). However you rapidly increase the surface area of your API. A single table will end up with tens of sprocs ranging from "GetFooById" to "GetFooOrderedByBarThenBaz" and "GetFooJoinedOnQuxByQuxId" etc etc. Sure...in theory they are more "secure". But the ability to audit your access becomes a case of auditing access to your 2000 sprocs on your 10 table database.

    Then when your new developer joins, they need to learn the API you have created that is the huge number of sprocs (as opposed to some kind of common Structured Query Language, that consists of known keywords like "SELECT" and "WHERE"). Naturally they find that the sproc doesn't QUITE do what they want, and they add another...causing another storm of auditing to occur.

    Finally you find that you have to add a column to your tables...cue going through each and every one of those 2000 sprocs!

    These compliance requirements are there for a reason, and nonensense, I've seen plenty of environments flourish this way. You do not need a new sproc just for adding a row, just like consolidating indexes, you also consolidate stored procs. If you need a different column, you add it. In edge cases of extreme data being fetched back with joins that simply don't work well, a rearchitecture might be needed. Whoever is mandating a new stored proc per row or minor difference is doing it wrong. Who would do that??

  • Mr. AHole DBA Guy (unregistered) in reply to not an anon
    not an anon:
    Mr. AHole DBA:
    not an anon:
    Mr. AHole DBA:
    garaden:
    Chubber:
    We need an expert who does this for a living to review it with a critical eye and make sure it's the way it needs to be!

    Those sound like they are trying to get a data architect to "review" what should have been done up front.

    Yeah, TRWTF is waiting four months to even start reviewing with a DBA. Of course, turns out he's waiting until the heat death of the universe, but oh well.

    Where I work all DDL must go through the data team, which makes sense to me, and definitely encourages people to bring them into the design process sooner rather than later. Waiting too long for review is a great way to have to make drastic changes late in your feature's development.

    Wish they wouldn't insist on using stored procs everywhere, though.

    Sorry bud, but we really do need to insist on stored procs everywhere mainly for 2-3 reasons:

    1- Compliance. Almost any compliance doc out there will require you to reduce the exposure to the various types of SQL Injection attacks, and by proxy, almost all of them require you to use stored procs to do this.

    2-Performance, cache plan invalidation, excessive memory usage, nasty parameter sniffing and all other kinds of anomalies do show up when we don't use proper stored procedures. Add that with using it on a heap of a table instead of a clustered indexed one, and your chances of hitting a nasty performance issue skyrockets.

    Stored procedures have nothing to do with such things, sadly. It's quite possible to leave your rump bare to SQLi inside a sproc (I had to deal with a case recently where I had to generate dynamic SQL w/o bind params in a sproc due to dynamic table names shivers; at least I don't have to worry about them coming directly from user input), and it's also quite possible to write clean, safe, performant SQL in a database that doesn't even have stored procedures, simply by using bind params in your embedded SQL. Perhaps you should spend a weekend or two with SQLite to refresh yourself on the basics?

    CAPTCHA: decet - Any decet DBA will know bind params vs stored procs.

    Really cute attempt to talk like a DBA but it failed.

    Like it or not the reality of the situation is as I stated: Security compliance almost always requires you to use stored procedures, and their driver for that is security. Go pull up a list of sec requirements for 'at rest data management and access' to see for yourself.

    When you have to talk to business owners, C level execs, auditors, etc. you will see that like it or not, they will insist on it. Period. End of story. If you attempt to go around it the red tape needed to explain it, and find an auditor that cares is not worth it. BUT Hey it's your environment, YOU get to do what YOU want to do. Just don't come near my machines with that attitude.

    Sure some developer experienced enough could work around the proper steps of the solution, but why? Why pay someone to go 'around' an issue that the engines are optimzied for? So what if it can be done, should it be done? Answer is rarely yes, and even in cases like LinQ the justification is rare.

    Sure some idiot could still expose himself to sql injection attacks even in a sproc, but again, why? Why would you ever, ever hire that person? Blocking several kinds of SQL injection attacks by using proper paramaterized stored procedures puts you at such a huge advantage that I don't know why it would ever be advocated against, nevermind the compiled plans performance and memory usage; but I wouldn't expect a developer to care about that.

    1. Try a SELECT * FROM :tbl; on your favorite database, where :tbl is a bind parameter bound to the name of some table you have handy. Then, stare down a wishing-well for a while. (You'll probably find me staring down that same wishing-well, too.)
    2. Keep in mind that a SQL RDBMS is well within its rights to not implement stored procedures at all. SQLite, the most widely deployed SQL implementation on this planet considering that it's in web browsers, smartphones, and all sorts of other places where you'd never expect a DBMS to turn up, doesn't bother with stored procs. And if you say 'real men ALWAYS use Oracle, no matter what the situation or the data', I'll challenge you to make an Oracle instance run at all on a bare-metal ARM Cortex-M with 1MB Flash and oh, 256KB of on-chip SRAM, along with a SD card (via SPI) instead of a disk. Like it or not, there are systems that need to take a database with them into places where your garden-variety client-server RDBMS can't go, or is inappropriate. (Imagine if Firefox required a database server running just to work.)

    CAPTCHA: acsi - the ANSI SQL committee got all acsi about the idea of bind parameters in FROM clauses.

    I thought this was a site for enterprise level developers with tons of experience. I really don't care what someone does with their webapp or mobile app, it doesn't pay the bills.

    Who the hell would use Oracle for 'everything'? That would be insane, those people have issues. A database inside an app that has 1 system user that doesn't get called from the outside ever? I really don't care what happens with that, no one has ever paid me enough money to even look at it because there isn't much impact on a minor system. Sure, someone could be slow loading their next Tinder matches, but the developers can usually fix those after some work.

    There's always edge cases where the concept is 'who cares? No one is going to really use your code anyways so why optimize' which is fine, but that isn't what pays the bills.

    If it's a critical multitenant environment and not some phone app or 1 guy, or it's publicly accessible, depending on the DB engine, it's getting stored procedures.

    The day it becomes the developers job is to manage performance, security, and availability of the instances and databases, including signing off on auditors documentation, then they can set your own non-best practices but otherwise, we'll have to follow what has been demonstrated and accepted as the best practices.

    CAPTCHA: minim The developers will do the minim needed to get their code into prod.

  • not an anon (unregistered) in reply to Mr. AHole DBA Guy
    Mr. AHole DBA Guy:
    not an anon:
    Mr. AHole DBA:
    not an anon:
    Mr. AHole DBA:
    garaden:
    Chubber:
    We need an expert who does this for a living to review it with a critical eye and make sure it's the way it needs to be!

    Those sound like they are trying to get a data architect to "review" what should have been done up front.

    Yeah, TRWTF is waiting four months to even start reviewing with a DBA. Of course, turns out he's waiting until the heat death of the universe, but oh well.

    Where I work all DDL must go through the data team, which makes sense to me, and definitely encourages people to bring them into the design process sooner rather than later. Waiting too long for review is a great way to have to make drastic changes late in your feature's development.

    Wish they wouldn't insist on using stored procs everywhere, though.

    Sorry bud, but we really do need to insist on stored procs everywhere mainly for 2-3 reasons:

    1- Compliance. Almost any compliance doc out there will require you to reduce the exposure to the various types of SQL Injection attacks, and by proxy, almost all of them require you to use stored procs to do this.

    2-Performance, cache plan invalidation, excessive memory usage, nasty parameter sniffing and all other kinds of anomalies do show up when we don't use proper stored procedures. Add that with using it on a heap of a table instead of a clustered indexed one, and your chances of hitting a nasty performance issue skyrockets.

    Stored procedures have nothing to do with such things, sadly. It's quite possible to leave your rump bare to SQLi inside a sproc (I had to deal with a case recently where I had to generate dynamic SQL w/o bind params in a sproc due to dynamic table names shivers; at least I don't have to worry about them coming directly from user input), and it's also quite possible to write clean, safe, performant SQL in a database that doesn't even have stored procedures, simply by using bind params in your embedded SQL. Perhaps you should spend a weekend or two with SQLite to refresh yourself on the basics?

    CAPTCHA: decet - Any decet DBA will know bind params vs stored procs.

    Really cute attempt to talk like a DBA but it failed.

    Like it or not the reality of the situation is as I stated: Security compliance almost always requires you to use stored procedures, and their driver for that is security. Go pull up a list of sec requirements for 'at rest data management and access' to see for yourself.

    When you have to talk to business owners, C level execs, auditors, etc. you will see that like it or not, they will insist on it. Period. End of story. If you attempt to go around it the red tape needed to explain it, and find an auditor that cares is not worth it. BUT Hey it's your environment, YOU get to do what YOU want to do. Just don't come near my machines with that attitude.

    Sure some developer experienced enough could work around the proper steps of the solution, but why? Why pay someone to go 'around' an issue that the engines are optimzied for? So what if it can be done, should it be done? Answer is rarely yes, and even in cases like LinQ the justification is rare.

    Sure some idiot could still expose himself to sql injection attacks even in a sproc, but again, why? Why would you ever, ever hire that person? Blocking several kinds of SQL injection attacks by using proper paramaterized stored procedures puts you at such a huge advantage that I don't know why it would ever be advocated against, nevermind the compiled plans performance and memory usage; but I wouldn't expect a developer to care about that.

    1. Try a SELECT * FROM :tbl; on your favorite database, where :tbl is a bind parameter bound to the name of some table you have handy. Then, stare down a wishing-well for a while. (You'll probably find me staring down that same wishing-well, too.)
    2. Keep in mind that a SQL RDBMS is well within its rights to not implement stored procedures at all. SQLite, the most widely deployed SQL implementation on this planet considering that it's in web browsers, smartphones, and all sorts of other places where you'd never expect a DBMS to turn up, doesn't bother with stored procs. And if you say 'real men ALWAYS use Oracle, no matter what the situation or the data', I'll challenge you to make an Oracle instance run at all on a bare-metal ARM Cortex-M with 1MB Flash and oh, 256KB of on-chip SRAM, along with a SD card (via SPI) instead of a disk. Like it or not, there are systems that need to take a database with them into places where your garden-variety client-server RDBMS can't go, or is inappropriate. (Imagine if Firefox required a database server running just to work.)

    CAPTCHA: acsi - the ANSI SQL committee got all acsi about the idea of bind parameters in FROM clauses.

    I thought this was a site for enterprise level developers with tons of experience. I really don't care what someone does with their webapp or mobile app, it doesn't pay the bills.

    Who the hell would use Oracle for 'everything'? That would be insane, those people have issues. A database inside an app that has 1 system user that doesn't get called from the outside ever? I really don't care what happens with that, no one has ever paid me enough money to even look at it because there isn't much impact on a minor system. Sure, someone could be slow loading their next Tinder matches, but the developers can usually fix those after some work.

    There's always edge cases where the concept is 'who cares? No one is going to really use your code anyways so why optimize' which is fine, but that isn't what pays the bills.

    If it's a critical multitenant environment and not some phone app or 1 guy, or it's publicly accessible, depending on the DB engine, it's getting stored procedures.

    The day it becomes the developers job is to manage performance, security, and availability of the instances and databases, including signing off on auditors documentation, then they can set your own non-best practices but otherwise, we'll have to follow what has been demonstrated and accepted as the best practices.

    CAPTCHA: minim The developers will do the minim needed to get their code into prod.

    Hint: that Cortex-M I mentioned isn't running some random mobile app. It's the kind of thing that'll be running a mission-critical embedded system, out in the middle of Donner Pass, that has to work, even if the power line to it fell down last week and the data radio that's your only IP connectivity is barely able to get a signal from the base station because the antenna is half buried in snow and the power's throttled all the way back to conserve the batteries that are now your only power source. Oh, and did I mention that those batteries have to last you yet another week before a crew can restore AC power?

    Do you want to be the DBA for that system, especially if it means going out and spending a few days in the Donner Pass, in a raging snowstorm, babysitting your database?

    P.S. Yes, the place I work for has field equipment out in the Donner Pass.

    CAPTCHA: ludus - You're ludus to think that enterprise-critical applications always live in cozy datacenters.

  • Dan (unregistered)

    That's how it was for me at my company. I discovered that "DBA" for us meant "database Administrator", not "Database Analyst".

  • Mr. AHole DBA Guy (unregistered) in reply to not an anon

    Avoiding the wall of quote text, and I repeat: " If it's a critical multitenant environment and not some phone app or 1 guy, or it's publicly accessible, depending on the DB engine, it's getting stored procedures. "

    What you described sounds like a 'edge case' and not a multi-tenant environment publicly accessible site with thousands of concurrent sessions exposed to all the script kiddies in the world with sensitive data.

    SQLLite wasn't designed so much as a network service but as a simple program, probably a dll or two, that runs in your application. Your business logic is now in the app instead of the RDBMS. EVEN THEN though, you can still create UDFs in python, powershell, etc. to act as a way of maintaining the logic. Clearly, if a RDBMS doesn't support stored procedures, then it's not going to be mandated to be used.

    There's more RDBMS systems out there than both of our fingers combined, so obviously no one is talking in absolutes but on this site sometimes that's missed since we're so tempted to present a edge case scenario to try to prove something wrong, such as a RDBMS that doesn't use procedures.

    What the heck does the backup power have to do with stored procedures anyways? Ok, it requires backup power for a whole week. Pretty irrelevant to the conversation. What does things having to be in data centers have to do with anything? I think your focus shouldn't be on data centers and power, but whether the RDBMS you're using has a internal DB engine which let's network users connect instead of SQLite which is simply available as part of the app.

  • not an anon (unregistered) in reply to Mr. AHole DBA Guy
    Mr. AHole DBA Guy:
    Avoiding the wall of quote text, and I repeat: " If it's a critical multitenant environment and not some phone app or 1 guy, or it's publicly accessible, depending on the DB engine, it's getting stored procedures. "

    What you described sounds like a 'edge case' and not a multi-tenant environment publicly accessible site with thousands of concurrent sessions exposed to all the script kiddies in the world with sensitive data.

    SQLLite wasn't designed so much as a network service but as a simple program, probably a dll or two, that runs in your application. Your business logic is now in the app instead of the RDBMS. EVEN THEN though, you can still create UDFs in python, powershell, etc. to act as a way of maintaining the logic. Clearly, if a RDBMS doesn't support stored procedures, then it's not going to be mandated to be used.

    There's more RDBMS systems out there than both of our fingers combined, so obviously no one is talking in absolutes but on this site sometimes that's missed since we're so tempted to present a edge case scenario to try to prove something wrong, such as a RDBMS that doesn't use procedures.

    What the heck does the backup power have to do with stored procedures anyways? Ok, it requires backup power for a whole week. Pretty irrelevant to the conversation. What does things having to be in data centers have to do with anything? I think your focus shouldn't be on data centers and power, but whether the RDBMS you're using has a internal DB engine which let's network users connect instead of SQLite which is simply available as part of the app.

    Let's flip over to the other hand: would you rather the entire app simply lived in the DB? It's most certainly possible...

  • Mr. AHole DBA Guy (unregistered) in reply to not an anon
    not an anon:
    Mr. AHole DBA Guy:
    Avoiding the wall of quote text, and I repeat: " If it's a critical multitenant environment and not some phone app or 1 guy, or it's publicly accessible, depending on the DB engine, it's getting stored procedures. "

    What you described sounds like a 'edge case' and not a multi-tenant environment publicly accessible site with thousands of concurrent sessions exposed to all the script kiddies in the world with sensitive data.

    SQLLite wasn't designed so much as a network service but as a simple program, probably a dll or two, that runs in your application. Your business logic is now in the app instead of the RDBMS. EVEN THEN though, you can still create UDFs in python, powershell, etc. to act as a way of maintaining the logic. Clearly, if a RDBMS doesn't support stored procedures, then it's not going to be mandated to be used.

    There's more RDBMS systems out there than both of our fingers combined, so obviously no one is talking in absolutes but on this site sometimes that's missed since we're so tempted to present a edge case scenario to try to prove something wrong, such as a RDBMS that doesn't use procedures.

    What the heck does the backup power have to do with stored procedures anyways? Ok, it requires backup power for a whole week. Pretty irrelevant to the conversation. What does things having to be in data centers have to do with anything? I think your focus shouldn't be on data centers and power, but whether the RDBMS you're using has a internal DB engine which let's network users connect instead of SQLite which is simply available as part of the app.

    Let's flip over to the other hand: would you rather the entire app simply lived in the DB? It's most certainly possible...

    IMO a DB engine should be responsible for storage of data, and retrieval of data, with some manipulation. Outside of that, as a rule of thumb, I would prefer the logic to be in the app. It's worked well for me thus far, but open to other thoughts.

  • (cs) in reply to Mr. AHole DBA Guy
    Mr. AHole DBA Guy:
    These compliance requirements are there for a reason, and nonensense, I've seen plenty of environments flourish this way. You do *not* need a new sproc just for adding a row, just like consolidating indexes, you also consolidate stored procs. If you need a different column, you add it. In edge cases of extreme data being fetched back with joins that simply don't work well, a rearchitecture might be needed. Whoever is mandating a new stored proc per row or minor difference is doing it wrong. Who would do that??

    Where do you live? My company is hiring.

  • Mr. AHole DBA (unregistered) in reply to chubertdev
    chubertdev:
    Mr. AHole DBA Guy:
    These compliance requirements are there for a reason, and nonensense, I've seen plenty of environments flourish this way. You do *not* need a new sproc just for adding a row, just like consolidating indexes, you also consolidate stored procs. If you need a different column, you add it. In edge cases of extreme data being fetched back with joins that simply don't work well, a rearchitecture might be needed. Whoever is mandating a new stored proc per row or minor difference is doing it wrong. Who would do that??

    Where do you live? My company is hiring.

    I sincerely thank you for the offer, I'm flattered, but I'm really happy at my current gig in So Cali.

    However, if you need any kind of ammo, I'll be happy to look up posts and writings from the real authorities of the database and design community on these best practices so you can refer to them when speaking with your DBAs.

    It will have to be a really extreme case for them to seriously demand a new stored proc per column difference. If that is the case, it might be a badly designed system or you guys just seriously blow through massive amounts of data that absolutely needs ACID compliance and a relational model.

  • WorldClass (unregistered) in reply to the beholder
    the beholder:
    WorldClass:
    Sounds like Bob doesn't know anything about databases. "No" seems appropriate.
    Chubber:
    Those sound like they are trying to get a data architect to "review" what should have been done up front.
    Rick:
    What they didn't manage was the application-specific stuff, like tables, indexing, stored procedure and queries. That stuff was the responsibility of the lead developer or architect on each development team. If you needed help you could ask the DBAs, but it was best to talk to them early so you could book their time well in advance.

    Uh-oh, we apparently have been invaded by an horde of DBAs tired of sitting on their thumbs wile their companies' devs do everything DB-related so they decided to spend time on tech forums to kill time.

    @Rick: I don't want the DBAs managing application specific stuff. I can handle it myself; in fact nobody knows what data MY system needs to store and retrieve from each table better than me. The submitter didn't ask them to do that. But table and index clustering, partitioning, data compression? That has DBA's job written all over it. Even situations like Matt Westwood's where he had to optimize a function sound like a joint effort dev+DBA is the way to go, i.e. the DBA should start moving his sorry ass.

    If the DBA can't do any of those things I mentioned I question how much he actually benefits the organization. That said, I've had the pleasure of working with a few GREAT DBAs in the past (even if that company was WTF-ridden elsewhere) and their job looked nothing like you described.

    I'm not a DBA. I'm a developer. I'm just saying Bob doesn't know anything about databases.

    There's no such thing as DBAs. These are just coders that can't write code and now they babysit data. Enormous waste of money.

  • (cs) in reply to Mr. AHole DBA
    Mr. AHole DBA:
    chubertdev:
    Mr. AHole DBA Guy:
    These compliance requirements are there for a reason, and nonensense, I've seen plenty of environments flourish this way. You do *not* need a new sproc just for adding a row, just like consolidating indexes, you also consolidate stored procs. If you need a different column, you add it. In edge cases of extreme data being fetched back with joins that simply don't work well, a rearchitecture might be needed. Whoever is mandating a new stored proc per row or minor difference is doing it wrong. Who would do that??

    Where do you live? My company is hiring.

    I sincerely thank you for the offer, I'm flattered, but I'm really happy at my current gig in So Cali.

    However, if you need any kind of ammo, I'll be happy to look up posts and writings from the real authorities of the database and design community on these best practices so you can refer to them when speaking with your DBAs.

    It will have to be a really extreme case for them to seriously demand a new stored proc per column difference. If that is the case, it might be a badly designed system or you guys just seriously blow through massive amounts of data that absolutely needs ACID compliance and a relational model.

    Crap, I'm in SoCal, too.

  • not an anon (unregistered) in reply to Mr. AHole DBA
    Mr. AHole DBA:
    chubertdev:
    Mr. AHole DBA Guy:
    These compliance requirements are there for a reason, and nonensense, I've seen plenty of environments flourish this way. You do *not* need a new sproc just for adding a row, just like consolidating indexes, you also consolidate stored procs. If you need a different column, you add it. In edge cases of extreme data being fetched back with joins that simply don't work well, a rearchitecture might be needed. Whoever is mandating a new stored proc per row or minor difference is doing it wrong. Who would do that??

    Where do you live? My company is hiring.

    I sincerely thank you for the offer, I'm flattered, but I'm really happy at my current gig in So Cali.

    However, if you need any kind of ammo, I'll be happy to look up posts and writings from the real authorities of the database and design community on these best practices so you can refer to them when speaking with your DBAs.

    It will have to be a really extreme case for them to seriously demand a new stored proc per column difference. If that is the case, it might be a badly designed system or you guys just seriously blow through massive amounts of data that absolutely needs ACID compliance and a relational model.

    Actually, if you start having sproc proliferation problems of that sort, wouldn't it be better to start refactoring your stored procs? I have a hard time believing that you couldn't write a stored proc that was parameterized on its result columnset...

  • Mr. AHole DBA (unregistered) in reply to WorldClass
    WorldClass:

    I'm not a DBA. I'm a developer. I'm just saying Bob doesn't know anything about databases.

    There's no such thing as DBAs. These are just coders that can't write code and now they babysit data. Enormous waste of money.

    Aww, WorldClass is having a World Class hissy fit today. The ironic thing is you do not understand that your code and lack of foresight into operations is the reason DBAs need to exist in the first place, and continue to get paid more than developers do by a nice sum, industry wide.

    In short: Don't suck so hard that the company has to hire admins, and pay them more than they pay you because you're not up to snuff buddy. Your salary isn't my fault, it's your fault.

  • kupfernigk (unregistered)

    DBA thinks DBAs should control part of the business logic of the program using stored procedures. Very surprising. Application developer who has to deal with the code management wants to keep all the code in one repository and maintain a single point of control for code. Also very surprising.

    The question for me is, at what actual size of application does the overhead in interface documentation and opportunity for error inherent in sprocs become worth the effort in terms of Taylorising the application? How many developers do you need to change this particular lightbulb?

    My own view is that a developer who can't deal with SQL injections shouldn't be allowed near anything where they can happen, and that the argument about partitioning code in the db or the application is irrelevant. But I've never worked on a system large enough to test that view.

  • not an anon (unregistered) in reply to kupfernigk
    kupfernigk:
    DBA thinks DBAs should control part of the business logic of the program using stored procedures. Very surprising. Application developer who has to deal with the code management wants to keep all the code in one repository and maintain a single point of control for code. Also very surprising.

    The question for me is, at what actual size of application does the overhead in interface documentation and opportunity for error inherent in sprocs become worth the effort in terms of Taylorising the application? How many developers do you need to change this particular lightbulb?

    My own view is that a developer who can't deal with SQL injections shouldn't be allowed near anything where they can happen, and that the argument about partitioning code in the db or the application is irrelevant. But I've never worked on a system large enough to test that view.

    Agreed that a dev who doesn't grok bind params has no business anywhere near SQL. One approach to resolving the bind of "who controls the stored procs?" is to have the "master" copies of your stored procs live as .sql files in your repository, and then use your schema deployment system to push them out alongside your DDL. That way, everything lives together under the control of the app team (and their attached DB dev, if you're in an organization that provides one), yet the system is flexible enough to deal with whatever partitioning between app and DB you use.

    As to 'what size app should you start using sprocs on?' it really depends on what your app does. If you're doing simple CRUD operations on data you own the schema for, stored procs are simply extra overhead. They're quite worthwhile for encapsulating complex DML or procedures that require a mix of DDL and DML; also, they may be a better choice than a view for encapsulating a complicated query, depending on how fast the data changes. Some operations are best not done in stored procs though: it's probably not very nice to your DBA to make him buy expensive licenses for the extra cores he just had to add to the DB server due to your CPU-hogging stored procs! (Or in other words, leave complicated computations, etal to the app server.)

  • Neil (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    The theory of operation of a CIWS is that you have a high-speed radar that scans for threats, and when you see one, you crank the gun around and open up.
    I have a vague memory of a film trailer that included vehicle-sized robots which were able to take out naval vessels single-handed. Were they using some sort of anti-radar or something? Surely they presented such a large surface area that they would have been hard to miss.
  • Bobby Tables (unregistered) in reply to not an anon
    not an anon:
    kupfernigk:
    DBA thinks DBAs should control part of the business logic of the program using stored procedures. Very surprising. Application developer who has to deal with the code management wants to keep all the code in one repository and maintain a single point of control for code. Also very surprising.

    The question for me is, at what actual size of application does the overhead in interface documentation and opportunity for error inherent in sprocs become worth the effort in terms of Taylorising the application? How many developers do you need to change this particular lightbulb?

    My own view is that a developer who can't deal with SQL injections shouldn't be allowed near anything where they can happen, and that the argument about partitioning code in the db or the application is irrelevant. But I've never worked on a system large enough to test that view.

    Agreed that a dev who doesn't grok bind params has no business anywhere near SQL. One approach to resolving the bind of "who controls the stored procs?" is to have the "master" copies of your stored procs live as .sql files in your repository, and then use your schema deployment system to push them out alongside your DDL. That way, everything lives together under the control of the app team (and their attached DB dev, if you're in an organization that provides one), yet the system is flexible enough to deal with whatever partitioning between app and DB you use.

    As to 'what size app should you start using sprocs on?' it really depends on what your app does. If you're doing simple CRUD operations on data you own the schema for, stored procs are simply extra overhead. They're quite worthwhile for encapsulating complex DML or procedures that require a mix of DDL and DML; also, they may be a better choice than a view for encapsulating a complicated query, depending on how fast the data changes. Some operations are best not done in stored procs though: it's probably not very nice to your DBA to make him buy expensive licenses for the extra cores he just had to add to the DB server due to your CPU-hogging stored procs! (Or in other words, leave complicated computations, etal to the app server.)

    Agree, CRUD stored procedures are a waste of time, prepared statements can do this fine, or even an ORM (which just uses prepared statements). However with the complicated computations, it depends. If the computations are more efficiently handled in set based approach, a stored procedure will beat an app server most times, use less CPU cycles and have a runtime that is far less. Any form of string processing has no place in a database. Let the app developers handle the single object, string processing, simple validation, single row processing but the dev DBAs should handle the set processing. On the other hand, let the app devs handle the large data sets and I make money fixing up the stuff ups. :)

  • Bobby Tables (unregistered) in reply to Mr. AHole DBA Guy

    Mr. AHole DBA, a few more years experience and you'll change your tune. Auditors don't demand stored procedures for everything, competent ones that is... I work with auditors a lot. Writing procs for CRUD, is mind numbing, slow and boring, let the frontend monkeys do that in their ORMs. more important to get the database design correct, something that should not be left to app developers, unless you want to pay me to fix up the mess they will create. Some of the reasons you have given for using procs are wrong, unless you're using SQL Server 2000, there is no difference between procs and prepared statements performance wise. Where there is a difference is when a frontend monkey pulls a large number of rows out of the database, does some processing (usually row by row) that can be replaced with a set approach and sends the results back to the database. The worst I have seen is an 11 hour process, written by very good developers (who had no idea of set theory) turn in a 1 minute process with a stored procedure. App developers tend to write horrid stored procedures, especially in PL/SQL, PL/SQL really has a lot to answer for as it lets developers write truly bad code, arrays and for loops in a database, that is a WTF. I shouldn't complain, fixing bad database code means I can have shiny things.

  • Bobby Tables (unregistered) in reply to Mr. AHole DBA

    I cringe when I see "best practice". It shows that the person using the term is unfamiliar with ITIL...

  • Mr. AHole DBA (unregistered) in reply to Bobby Tables
    Bobby Tables:
    I cringe when I see "best practice". It shows that the person using the term is unfamiliar with ITIL...

    Quite untrue good sir, I'm ITIL V3 certified. The concept of 'best practices' aren't made obsolete by ITIL, more so that they evolve over time under the continual service improvement cycle. :)

  • Mr. AHole DBA (unregistered) in reply to Bobby Tables
    Bobby Tables:
    Mr. AHole DBA, a few more years experience and you'll change your tune. Auditors don't demand stored procedures for everything, competent ones that is...

    I work with auditors a lot. Writing procs for CRUD, is mind numbing, slow and boring, let the frontend monkeys do that in their ORMs.

    In my experience for those cases, then do stored procs just for manageability sake. Yes, there isn't a performance issue with properly parameterized queries vs stored proc, but it's more about management.

    I could also grant EXECUTE permissions to indvl stored procs in a DB, of course you could handle that on your app if you'd like but it does provide an additional step for you and 1 less level of control for the DBA who might get odd requests here and there. We could change the internal code of the stored procedure and not change the output/inputs so it helps the developers from having to go through a whole new rebuild of code to change 1 item. That's pretty nice.

    However, if you do use an abstraction layer such as an ORM and it fits a good business need, I'm not going to get in the way of it. Yea, it'll make my job a pain in the butt sometimes but so what, the world isn't tailored to me, it's tailored to the business requirements and what the 'right' approach is. There aren't too many cases where you will write properly parameterized queries that you wouldn't benefit from turning them into a stored proc IMO, and it will make your life a lot easier with auditors whom the business gets to pick.

    more important to get the database design correct, something that should not be left to app developers, unless you want to pay me to fix up the mess they will create. Some of the reasons you have given for using procs are wrong, unless you're using SQL Server 2000, there is no difference between procs and prepared statements performance wise. Where there is a difference is when a frontend monkey pulls a large number of rows out of the database, does some processing (usually row by row) that can be replaced with a set approach and sends the results back to the database. The worst I have seen is an 11 hour process, written by very good developers (who had no idea of set theory) turn in a 1 minute process with a stored procedure. App developers tend to write horrid stored procedures, especially in PL/SQL, PL/SQL really has a lot to answer for as it lets developers write truly bad code, arrays and for loops in a database, that is a WTF. I shouldn't complain, fixing bad database code means I can have shiny things.

    I can see your point(s) and largely agree. I let the developers have dominion over their code unless it's a security/performance/manageability issue. One problem in large shops is you get 'new' or 'blemished' developers who do write garbage but that comes with the job, and as you mentioned also gives us job security.

    Cheers.

  • Nate (unregistered) in reply to Mr. AHole DBA
    Mr. AHole DBA:
    Add that with using it on a heap of a table instead of a clustered indexed one, and your chances of hitting a nasty performance issue skyrockets.

    If you believe that adding a clustered index is a panacea I have a bridge to sell you. Clustered indexes are useful but only when you actually use them the right way. Sure, if you are doing a transactional application which does 1-row key-based queries, makes sense. For analytics, your clustering key on the surrogate ID is useless and just slows down my full table scans.

  • commoveo (unregistered) in reply to Bobby Tables
    Bobby Tables:
    I cringe when I see "best practice". It shows that the person using the term is unfamiliar with ITIL...
    That's funny, I cringe when I see "ITIL". It shows that the person using the term is unfamiliar with sanity...

Leave a comment on “Just Roll With It”

Log In or post as a guest

Replying to comment #:

« Return to Article