Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Keeping the server busy

Keeping the server busy

Scheduled Pinned Locked Moved The Weird and The Wonderful
comsysadmin
8 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Duncan Edwards Jones
    wrote on last edited by
    #1

    Extracted from a really slow stored proc: SELECT 0 * Sum(IIf([amortisedClosePriceIssueYld]=0 Or [amortisedClosePrice]=0,0,-[bsqflag]*[closedq]*[valpoint]*([amortisedClosePriceIssueYld]-[amortisedtpissueyld]))) AS LocalRealisedAmortIssue FROM ((((PL1RPLCloseOuts INNER JOIN seclocal AS sec ON PL1RPLCloseOuts.id = sec.id) LEFT JOIN SecTypeValidationRuleslocal AS SecTypeValidationRules ON sec.sectype = SecTypeValidationRules.sectype) INNER JOIN TradeFundlocal AS TradeFund ON PL1RPLCloseOuts.fund = TradeFund.fund) INNER JOIN tradetlocal AS TradeT ON PL1RPLCloseOuts.tt = TradeT.tt) INNER JOIN PL1RplTaxlots ON (PL1RPLCloseOuts.tnum = PL1RplTaxlots.tnum) AND (PL1RPLCloseOuts.tt = PL1RplTaxlots.tt) Yes indeed - do a huge amount of maths and multiply the resulting figure by zero...oh

    '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

    L R V 3 Replies Last reply
    0
    • D Duncan Edwards Jones

      Extracted from a really slow stored proc: SELECT 0 * Sum(IIf([amortisedClosePriceIssueYld]=0 Or [amortisedClosePrice]=0,0,-[bsqflag]*[closedq]*[valpoint]*([amortisedClosePriceIssueYld]-[amortisedtpissueyld]))) AS LocalRealisedAmortIssue FROM ((((PL1RPLCloseOuts INNER JOIN seclocal AS sec ON PL1RPLCloseOuts.id = sec.id) LEFT JOIN SecTypeValidationRuleslocal AS SecTypeValidationRules ON sec.sectype = SecTypeValidationRules.sectype) INNER JOIN TradeFundlocal AS TradeFund ON PL1RPLCloseOuts.fund = TradeFund.fund) INNER JOIN tradetlocal AS TradeT ON PL1RPLCloseOuts.tt = TradeT.tt) INNER JOIN PL1RplTaxlots ON (PL1RPLCloseOuts.tnum = PL1RplTaxlots.tnum) AND (PL1RPLCloseOuts.tt = PL1RplTaxlots.tt) Yes indeed - do a huge amount of maths and multiply the resulting figure by zero...oh

      '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

      L Offline
      L Offline
      liquidplasmaflow
      wrote on last edited by
      #2

      You would think a product as sophisticated as SQL Server would be able to optimize that down...

      P 1 Reply Last reply
      0
      • D Duncan Edwards Jones

        Extracted from a really slow stored proc: SELECT 0 * Sum(IIf([amortisedClosePriceIssueYld]=0 Or [amortisedClosePrice]=0,0,-[bsqflag]*[closedq]*[valpoint]*([amortisedClosePriceIssueYld]-[amortisedtpissueyld]))) AS LocalRealisedAmortIssue FROM ((((PL1RPLCloseOuts INNER JOIN seclocal AS sec ON PL1RPLCloseOuts.id = sec.id) LEFT JOIN SecTypeValidationRuleslocal AS SecTypeValidationRules ON sec.sectype = SecTypeValidationRules.sectype) INNER JOIN TradeFundlocal AS TradeFund ON PL1RPLCloseOuts.fund = TradeFund.fund) INNER JOIN tradetlocal AS TradeT ON PL1RPLCloseOuts.tt = TradeT.tt) INNER JOIN PL1RplTaxlots ON (PL1RPLCloseOuts.tnum = PL1RplTaxlots.tnum) AND (PL1RPLCloseOuts.tt = PL1RplTaxlots.tt) Yes indeed - do a huge amount of maths and multiply the resulting figure by zero...oh

        '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

        R Offline
        R Offline
        Robert Royall
        wrote on last edited by
        #3

        :wtf: I saw the "SELECT 0 * Sum" and immediately thought this was a joke. Apparently I was wrong. :doh:

        Please don't bother me... I'm hacking right now. Don't look at me like that - doesn't anybody remember what "hacking" really means? :sigh:

        1 Reply Last reply
        0
        • L liquidplasmaflow

          You would think a product as sophisticated as SQL Server would be able to optimize that down...

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Only if the SQL standard allows it to.

          B 1 Reply Last reply
          0
          • D Duncan Edwards Jones

            Extracted from a really slow stored proc: SELECT 0 * Sum(IIf([amortisedClosePriceIssueYld]=0 Or [amortisedClosePrice]=0,0,-[bsqflag]*[closedq]*[valpoint]*([amortisedClosePriceIssueYld]-[amortisedtpissueyld]))) AS LocalRealisedAmortIssue FROM ((((PL1RPLCloseOuts INNER JOIN seclocal AS sec ON PL1RPLCloseOuts.id = sec.id) LEFT JOIN SecTypeValidationRuleslocal AS SecTypeValidationRules ON sec.sectype = SecTypeValidationRules.sectype) INNER JOIN TradeFundlocal AS TradeFund ON PL1RPLCloseOuts.fund = TradeFund.fund) INNER JOIN tradetlocal AS TradeT ON PL1RPLCloseOuts.tt = TradeT.tt) INNER JOIN PL1RplTaxlots ON (PL1RPLCloseOuts.tnum = PL1RplTaxlots.tnum) AND (PL1RPLCloseOuts.tt = PL1RplTaxlots.tt) Yes indeed - do a huge amount of maths and multiply the resulting figure by zero...oh

            '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

            V Offline
            V Offline
            Vasudevan Deepak Kumar
            wrote on last edited by
            #5

            Perhaps a marriage of SQLServer with Unix. :) There is something in Unix where you can divert junk files (howmuch ever huge it is, even beyond the capacity of the disk) to an infine sink called /dev/null.

            Vasudevan Deepak Kumar Personal Homepage
            Tech Gossips
            A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

            R P 2 Replies Last reply
            0
            • V Vasudevan Deepak Kumar

              Perhaps a marriage of SQLServer with Unix. :) There is something in Unix where you can divert junk files (howmuch ever huge it is, even beyond the capacity of the disk) to an infine sink called /dev/null.

              Vasudevan Deepak Kumar Personal Homepage
              Tech Gossips
              A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

              R Offline
              R Offline
              Russell Jones
              wrote on last edited by
              #6

              MySQL has a fantastic storage engine called "Blackhole" It supports Inserts only, not deletes, selects or Updates.

              1 Reply Last reply
              0
              • P PIEBALDconsult

                Only if the SQL standard allows it to.

                B Offline
                B Offline
                Bram van Kampen
                wrote on last edited by
                #7

                I suppose theoretically the maths calc could have side effects.

                Bram van Kampen

                1 Reply Last reply
                0
                • V Vasudevan Deepak Kumar

                  Perhaps a marriage of SQLServer with Unix. :) There is something in Unix where you can divert junk files (howmuch ever huge it is, even beyond the capacity of the disk) to an infine sink called /dev/null.

                  Vasudevan Deepak Kumar Personal Homepage
                  Tech Gossips
                  A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #8

                  Vasudevan Deepak K wrote:

                  something in Unix

                  DOS and OpenVMS also have null devices.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups