Forum Replies Created

Viewing 15 posts - 19,216 through 19,230 (of 49,552 total)

  • RE: Update table with id from another table

    Wait.

    In recovery means that SQL is busy running crash recovery on the database. Wait until it is finished.

    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: how to separate value columns my matching two flag

    You're missing my point.

    All three of those sets of data are identical, there is no such thing as 'order' of rows in a table. You cannot say that a row...

    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: Problem in passing of parameters in a stored procedure. Please help.

    mtassin (4/10/2012)


    Yes there's a CPU penalty to pay, but wouldn't it wind up with just three plans in the cache? The original one that builds the query plus one...

    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: Alternate to context based search

    SathishK (4/10/2012)


    This proc will be called for auto-complete feature and while typing each character it will be called.

    That's a very good way to really slow a database down...

    Does...

    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

    Gianluca Sartori (4/10/2012)


    CLR tricks aside, how can you call a procedure inside a function?

    OPENROWSET

    Doesn't make it good practise, can have some really fun effects (functions aren't allowed to change data...

    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: Strange query plan behaviour

    This: http://sqlinthewild.co.za/index.php/2008/05/22/parameter-sniffing-pt-3/

    Also http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.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: tempdb transaction log file growth - SQL Server 2000

    Are you sure that checkpoint is not getting issued or could it be that checkpoint is getting issued but the log space is not getting marked reusable?

    http://www.sqlservercentral.com/articles/Transaction+Log/72488/

    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: Strange query plan behaviour

    Can you post the stored procedure and the execution plan please?

    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: Problem in passing of parameters in a stored procedure. Please help.

    Dynamic SQL should be used when there's no other way of solving the problem. It's not the first thing you should think of. Also, a 'good SQL programmer' (whatever that...

    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: I have a simple question on a select statement.

    Look up the ROW_NUMBER function.

    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: Problem in passing of parameters in a stored procedure. Please help.

    mtassin (4/10/2012)


    The other one turned into

    SELECT * FROM [Student] WHERE [ID] = 001

    Which would get converted because he went dynamic... no?

    That would be an implicit conversion whether the 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: Get only 100 records in a transaction using LSN

    Then that's something specific to CDC, there will be at least 5 LSNs for those 3 rows inserted.

    I don't have a DB with CDC enabled to test on, I could...

    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: Who created a filegroup?

    What's in it is easy.

    Query sys.partitions join to sys.allocation_units to sys.data_spaces (you can use object_name on the object id from sys.partitions)

    Who created it may not be possible to discover....

    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: Problem in passing of parameters in a stored procedure. Please help.

    mtassin (4/10/2012)


    Really? Wow... I recall a time when if you had two queries like this nested inside of IF statements

    (granted this is a really simple one) that the compiler...

    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: Problem in passing of parameters in a stored procedure. Please help.

    That said, this is a bad approach for a number of reasons and you should consider multiple procedures.

    This is just one reason:

    http://sqlinthewild.co.za/index.php/2009/09/15/multiple-execution-paths/

    Another reason has to do with the 'single responsibility'...

    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 - 19,216 through 19,230 (of 49,552 total)