Forum Replies Created

Viewing 15 posts - 38,731 through 38,745 (of 49,552 total)

  • RE: Writing Dynamic Stored Procedure

    self.soul.friend (6/2/2009)


    Is this really inefficient on large tables?

    Yes.

    It does not (and cannot) use indexes properly. Table scans are not much fun on million+ row tables.

    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: Wrong Execution Plan for Stored Procedure?

    Parameter sniffing?

    http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/

    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: T-SQL/stored procedure/dtsrun data type error when passing parameters

    Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic727464-19-1.aspx

    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: Corrupt Database running dbcc checkdb, missing sys.indexes (urgent help needed!)

    Holger, does this query return anything? If so, try a drop statistics with the name returned and see if that fixes the problem. Absolutely no promises.

    select object_name(object_id), name, stats_id from...

    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: Deleting temp tables in the system "tempdb".

    Only the connection that created them can drop them or query them.

    See if you can query sys.dm_db_index_physical_stats for all the tables in TempDB. That might give you the page...

    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: Help with outer join

    Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: Are the posted questions getting worse?

    I've got bad memories of a very arrogant American couple that I ran into (not literally) in Grahamstown while I was a student there. They were finding fault with everything,...

    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: Writing Dynamic Stored Procedure

    I have a lot, lot more rows - 962662. Not due to MS. I padded out my copy of AW last year for my PASS presentation. Query time differences weren't...

    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: sp_executesql, will not replace @variable when it is the table name in from clause

    Parameters in sp_executesql are only allowed in the places they're allowed in normal SQL. If you want the table name to be a variable, you'll have to concatenate that value...

    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: Error .........While Restoring MASTER database

    bhuvnesh.dogra (6/2/2009)


    hi

    yes from Different Server.

    That's not a particularly good idea. There's a fair bit of stuff in master that's specific to the machine it was built on. Taking...

    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: Error .........While Restoring MASTER database

    Are you trying to restore a master database from a different 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: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '-'.

    Put square brackets around the linked server name.

    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: optimizing query

    Ok, you've neither given me all the table definitions nor any sample data so I can't test this, but give this a try. It should give you the idea if...

    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 2003 possible problem?

    Can you try reinstalling the java drivers?

    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: Writing Dynamic Stored Procedure

    TheSQLGuru (6/1/2009)


    use adventureworks

    go

    drop proc test

    go

    create proc test (@productid int = null, @quantity int = null)

    as

    set nocount on

    select *

    from [Production].[TransactionHistory]

    where (@productid is null or @productid = ProductID) --indexed

    and (@quantity is...

    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 - 38,731 through 38,745 (of 49,552 total)