Forum Replies Created

Viewing 15 posts - 38,506 through 38,520 (of 49,552 total)

  • RE: can i add column in table variable or temporary table

    mjarsaniya (6/11/2009)


    I cant I have also tried same with temporary table but i can not

    create table #tbl(id int identity,index_value_table_name nvarchar(max),index_value_column_name nvarchar(max));

    declare @var nvarchar(max);

    set @var='mynk'

    alter table #tbl

    add column + @var +...

    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: Stored Procedure Code to "Up To Date"

    gmartin (6/11/2009)


    There must be a way to refresh or reload that meta data.

    There is nothing to refresh. Procedures are only stored in one place in SQL, in a hidden system...

    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: Stored Procedure Code to "Up To Date"

    gmartin (6/11/2009)


    I appreciate the help. But I'm asking a pretty specific question. I need to know how to "refresh" the internal system tables.

    You can't 'refresh' the system 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: Date string in WHERE causes table scan instead of index seek

    Joseph Fallon (6/11/2009)


    When I don't use "SELECT * FROM " the query always uses the covering index. Thanks for the tip Mr Stobbs.

    Is the index really covering for SELECT *?...

    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: Date string in WHERE causes table scan instead of index seek

    Christopher Stobbs (6/11/2009)


    Gail am I correcting in saying and I think I might have learn't or if I am wrong missunderstood, but ify ou have two columns in your where...

    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: TRUNCATE / Foreign Key issue

    Wilfred van Dijk (6/11/2009)


    I didn't found any restrictions on truncate in combination with FK (in BOL).

    - Is this a known issue (bug?)

    Not a bug, a documented restriction.

    From Books online, 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: Date string in WHERE causes table scan instead of index seek

    Christopher Stobbs (6/11/2009)


    Joseph Fallon what order are the fields in your in covering index, this will make a difference.

    It will, because one of the columns is an inequality.

    http://sqlinthewild.co.za/index.php/2009/02/06/index-columns-selectivity-and-inequality-predicates/

    p.s. Please in...

    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: DATABASE

    Eswin (6/11/2009)


    Gila so what should be done when your log file or data file grows and reaches the limit of the space available in server.

    Get more disks or delete some...

    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: DATABASE

    Why do you want to shrink? Databases tend to grow as more data gets put in them. It's in their nature.

    Shrinking causes massive fragmentation and will just result in 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: Modify the index on a table to include ANOTHER column.

    Drop the index, create a new one. Or create the index with the DROP_EXISTING clause

    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: Comparing Table Variables with Temporary Tables

    Tim Walker (6/10/2009)


    Question: (and I wouldn't have even asked it if I hadn't read this first) is what is the point in defining an index on a table variable 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: Stored Proc Storage

    Stored procedures are stored in one of the system tables. The system tables are all on the primary filegroup and cannot be moved. You could create a second filegroup for...

    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: Transaction Log file saved as MDF

    Robert klimes (6/10/2009)


    if you want to rename the log file to have ldf extension

    alter database &lt database name&gt modify file(name = &lt logical filename &gt, filename = &lt physical file...

    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: dbcc checkdb command run as a sql agent job?

    Yup.

    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: Performance tuning a procedure

    Just looked at the plan. There are incorrect estimates (too high) in a few places so that may explain the cost. Also, if you look, the first plan has paralleled...

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