• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Reply to: T-SQL question

Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "T-SQL question"

Collapse

  • lightng
    replied
    Originally posted by Ardesco View Post
    You can be gay and still a grandparent (a few years marriage as a when you were young that resulted in children before you realised that men/women were not for you, or the same again for your partner)
    OK, so there was a tiny hole in my statement. I just hope nobody brings up the turkey baster flaw too.

    Leave a comment:


  • Ardesco
    replied
    Originally posted by lightng View Post
    Eh up! By calling me a grandad or grandma, you are also making sexual orientation assumptions.

    You can be gay and still a grandparent (a few years marriage as a when you were young that resulted in children before you realised that men/women were not for you, or the same again for your partner)

    HTH

    Leave a comment:


  • vetran
    replied
    No great sql genius but using views is BAAD.

    Works fine then the owner of the view asks for the view to be changed to restrict xyz data then your beautiful sql is broken and you have no idea how to fix it. You wrote it two years ago.

    Indexing is your friend 10 times speed improvements very normal.

    Take as little data as you need then work with it, the first cut is the deepest.

    Leave a comment:


  • lightng
    replied
    Originally posted by k2p2 View Post
    Sorry grandad (or grandma - no gender assumptions!) No offence meant. I wasn't making assumptions about your age, merely lamenting my own!
    Eh up! By calling me a grandad or grandma, you are also making sexual orientation assumptions.

    Leave a comment:


  • Weltchy
    replied
    I find execution plans can be a bit hit and miss unless your really careful/clever with how you structure your SQL Statements.

    Leave a comment:


  • mudskipper
    replied
    Originally posted by lightng View Post
    Joking aside, the assumptions you make about my age are WILDLY inaccurate. If I wasn't such a cool and hip oldie, I would have probably found your comments mildly offensive, at least briefly, and then, I would have dismissed them as a product of senile dementia.
    Sorry grandad (or grandma - no gender assumptions!) No offence meant. I wasn't making assumptions about your age, merely lamenting my own!

    Leave a comment:


  • Zippy
    replied
    Originally posted by lightng View Post
    Duly noted. Jeez I can't wait till I'm 23, so you lot will stop bullying me
    Oh stop blubbing lightng minor!

    Leave a comment:


  • lightng
    replied
    Originally posted by Zippy View Post
    The success of projects run using agile methodologies is predicated on having a team of highly skilled individuals who can not only gather requirements and design applications, but who will re-write code where they find it to be deficient. Dynamic requirements are no excuse young man.
    Duly noted. Jeez I can't wait till I'm 23, so you lot will stop bullying me

    Leave a comment:


  • Zippy
    replied
    Originally posted by lightng View Post
    In the old SSADM days you had the luxury of designing up front. SSADM - I think I read about that in an old computer studies history e-book. :-P

    Most of my work involves changing requirements in an agile environment with dynamic requirements. Its not always ideal but thats the world we young 'uns who have just come out of college operate. The way the data is consumed and populated can change from iteration to iteration.

    Joking aside, the assumptions you make about my age are WILDLY inaccurate. If I wasn't such a cool and hip oldie, I would have probably found your comments mildly offensive, at least briefly, and then, I would have dismissed them as a product of senile dementia.
    The success of projects run using agile methodologies is predicated on having a team of highly skilled individuals who can not only gather requirements and design applications, but who will re-write code where they find it to be deficient. Dynamic requirements are no excuse young man.

    Leave a comment:


  • Spacecadet
    replied
    Originally posted by k2p2 View Post
    Way back in the olden days, programmers designed queries, not DBAs.
    some of us are dedicated database developers, having said that, after a certain point knowledge of how to be a DBA is important as you need to know what is happening under the hood to really get the most out of a database.

    Originally posted by k2p2 View Post
    It is a different skill to designing code.
    Indeed, writing good SQL requires being able to think in terms of interacting sets of data rather than repeatable actions.
    Many a time I've rewritten other peoples code to remove cursor loops which although functionally correct are very inefficient and go against the whole ethos of SQL query writing. Typically a stored procedure which uses a cursor and takes 10 minutes to run can be rewritten as a single query which will run in a fraction of a second.

    Originally posted by k2p2 View Post
    Do they still teach students stuff like 3NF at college?
    I should hope so!

    Originally posted by k2p2 View Post
    It really is worth learning the basics of how indexes work and how to read a query execution plan - it will make a huge difference to how your queries run.

    Leave a comment:


  • lightng
    replied
    Originally posted by k2p2 View Post
    Agreed - willy nilly indexes can be counter productive. The point is that you can (and, with complex queries, should) design your queries - in the old SSADM days, you'd know what indexes you needed before you touched the database.
    In the old SSADM days you had the luxury of designing up front. SSADM - I think I read about that in an old computer studies history e-book. :-P

    Most of my work involves changing requirements in an agile environment with dynamic requirements. Its not always ideal but thats the world we young 'uns who have just come out of college operate. The way the data is consumed and populated can change from iteration to iteration.

    Joking aside, the assumptions you make about my age are WILDLY inaccurate. If I wasn't such a cool and hip oldie, I would have probably found your comments mildly offensive, at least briefly, and then, I would have dismissed them as a product of senile dementia.

    Leave a comment:


  • mudskipper
    replied
    Originally posted by lightng View Post
    Normalisation forms: The key, the whole key and nothing but the key etc. Of course, all basic stuff. You can only read a query execution plan once you have a query and therefore it is only then that you know where indexes should be.

    So saying that indexes are the first thing that should be considered is not necessarily true.

    Too many indexes are just as bad as not enough. There are performance implications both ways. Thats why I don't just chuck in indexes willy nilly at the start.
    Agreed - willy nilly indexes can be counter productive. The point is that you can (and, with complex queries, should) design your queries - in the old SSADM days, you'd know what indexes you needed before you touched the database.

    Leave a comment:


  • lightng
    replied
    Originally posted by k2p2 View Post
    Way back in the olden days, programmers designed queries, not DBAs. It is a different skill to designing code. Do they still teach students stuff like 3NF at college? It really is worth learning the basics of how indexes work and how to read a query execution plan - it will make a huge difference to how your queries run.
    Normalisation forms: The key, the whole key and nothing but the key etc. Of course, all basic stuff. You can only read a query execution plan once you have a query and therefore it is only then that you know where indexes should be.

    So saying that indexes are the first thing that should be considered is not necessarily true.

    Too many indexes are just as bad as not enough. There are performance implications both ways. Thats why I don't just chuck in indexes willy nilly at the start.
    Last edited by lightng; 17 February 2010, 21:52.

    Leave a comment:


  • mudskipper
    replied
    Way back in the olden days, programmers designed queries, not DBAs. It is a different skill to designing code. Do they still teach students stuff like 3NF at college? It really is worth learning the basics of how indexes work and how to read a query execution plan - it will make a huge difference to how your queries run.

    Leave a comment:


  • HairyArsedBloke
    replied
    Originally posted by lightng View Post
    One thing I would like to see are namespaces, folders or some way of organising mssql objects rather than having to create a custom naming convention.
    Aye

    Leave a comment:

Working...
X