Forum Replies Created

Viewing 15 posts - 45,106 through 45,120 (of 49,552 total)

  • RE: Is there any trace flag that I can use to monitor who is using the database often

    Have you considered profiler or a serverside trace? If you don't mind your error log growing significantly, you could also set the option to audit successful logins. (found under server...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    Grant Fritchey (8/12/2008)


    I'm on the way home, I'll try to set up a test tomorrow.

    I saved you the trouble.

    http://sqlinthewild.co.za/index.php/2008/08/12/views-or-functions/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    riix (8/12/2008)


    Now you really feel running a view that returns zillions of huge rows into a stored procedure that then just selects a few from that lot (and then only...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    Grant Fritchey (8/12/2008)


    riix, try this, execute a query involving a JOIN to a view, a single-statement UDF and a multi-statement UDF where each returns a couple of hundred rows....

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    riix (8/12/2008)


    Hmm .. if I have a situation where a multi-statement tvf is *required* then its most likely not something that I could've done in a view.

    Indeed. I have,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: One Hour Query that used to take 13 minutes

    pino_daddy (8/12/2008)


    Don't think teh UPPER has anything to do with it.

    If I comment out the joing:

    LEFT OUTER JOIN SW_ORD_LIST_EXT OLE ON (UPPER(BH.ORDER_NO) = UPPER(OLE.ORDER_NO) AND BDTL.LINE_NO = OLE.LINE_NO)

    The estimated and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: One Hour Query that used to take 13 minutes

    pino_daddy (8/12/2008)


    Don't think teh UPPER has anything to do with it.

    If I comment out the joing:

    LEFT OUTER JOIN SW_ORD_LIST_EXT OLE ON (UPPER(BH.ORDER_NO) = UPPER(OLE.ORDER_NO) AND BDTL.LINE_NO = OLE.LINE_NO)

    The entire query...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: One Hour Query that used to take 13 minutes

    pino_daddy (8/12/2008)


    Yes I did that and it does work, but it does not save any time off the execution.

    Can you post the execution plans of the query with the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: One Hour Query that used to take 13 minutes

    In SQL 2000, you can't save the graphical plan. An acceptable alternative is to run the query with SET SHOWPLAN_ALL ON, run to grid, select the entire grid and paste...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Server Logs:: Starting up database '' ''

    lucas229 (8/12/2008)


    Does the Auto-close property hurt the performance of my sql-server?

    Depends how often the database in question is used. If it's used once a month, probably not, if it's used...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    riix (8/12/2008)


    regarding comment:

    "view vs stored proc....you still need to wrap the view up in a stored proc in order use dynamic selection criteria."

    wrong - use a table-valued function. Much tidier...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    ryan.leuty (8/12/2008)


    Is it better [faster, more reliable, more secure] to send a complex statement to SQL via the web app, or use a sproc?

    Faster, maybe. It depends. SQL caches execution...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Profanities

    riix (8/12/2008)


    why not add in diagrams and foreign key constraints? surely there's a perf penalty to consider when every fk is constantly yet needlessly checked by the dbms when...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: The Active DBA

    Grant Fritchey (8/12/2008)


    I can't come up on Saturday, but I can get there early on Sunday. If that fits the agenda, let me know.

    I may go through on the sunday,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Temp Tables usage and deadlocks in SQL Server 2000

    Jayakrishnan (8/12/2008)


    In complex stored procedures we are using one or two temp tables. It was working fine initially. But DBA suggested us to add the following lines in the SP...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 45,106 through 45,120 (of 49,552 total)