Forum Replies Created

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

  • RE: Inline Function

    They've been there since SQL 2000, along with the table-valued functions.

    eg:

    CREATE FUNCTION DoSomeThing (@ID int) RETURNS INT

    AS

    BEGIN

    DECLARE @Result INT

    SELECT @Result = SomeValue FROM SomeTable Where SomeKey = @ID

    ...

    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: Indexes on table with more than 20 columns

    No, because DocumentID is your clustered index and you're not filltering on it anywhere.

    Maybe stick with just DocumentTypeId , IsActive, IsTemplate if the ordering column is going to change. It...

    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: General queries regarding SQL Server

    Is there anyone who knows SQL there?

    What @@Servername returns is the full name of the SQL instance. In your case, you have a named instance.

    "OEMSBSCN-3935" is the server name

    "SBSMONITORING" 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
  • RE: Doubt in Understanding in Where condition

    ID & 3 is doing bitwise manpulation

    3 has the bit pattern (just using 1 byte) 00000011

    2 has the bit pattern 00000010.

    When you do a logical and of 3 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: Indexes on table with more than 20 columns

    What % of the table is likely to have IsActive 1 and IsTemplate 0?

    As a first suggestion, consider this:

    CREATE INDEX idx_Documents_Search1 ON Documents

    (DocumentTypeId , IsActive, IsTemplate, Title)

    Title is 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: Blocking or Block By

    In general neither. It's not a really good idea to go around killing connections unless you know what the consequences will be.

    Better idea is to fix code so that long...

    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: Primary Data file currpted

    If you don't have any backup (why not?) then you are very likely out of luck.

    You can try the following.

    Create a new database with the same number of that 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: Indexes on table with more than 20 columns

    Hmmm. It's not an easy indexing scenario.

    Are there any columns or set of columns that are always or most of the time specified in the queries?

    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: Oracle SSIS Package

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

    No replies to this thread please. Direct replies to:

    http://www.sqlservercentral.com/Forums/Topic516329-148-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: Oracle SSIS package

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

    No replies to this thread please. Direct replies to:

    http://www.sqlservercentral.com/Forums/Topic516329-148-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: Optimizing an index for select count(distinct)

    Can you post the execution plan in its xml format please? (saved as a .sqlplan file zipped and attached to a post)

    What indexes do you currently have on the table?

    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: Which situation we go for CLR?

    What MS is not making particuarly clear is that CLR is intended to, in a couple of versions, replace extended stored procs.

    Books Online


    Extended Stored Procedures

    Important:

    This feature will be...

    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: Need to know which user is calling which proc and SQL Server.

    Use the 2 DMVs sys.dm_exec_requests and sys.dm_exec_sessions to see details of who is running queries against the server. You can join in the function sys.dm_exec_sql_text to get the details of...

    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: Remove Locking from particular row

    Some other process is holding an extended lock on part or all of the table.

    You can use the DMV sys.dm_tran_locks to see what locks are held and by what processes.

    Locks...

    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: Indexes on table with more than 20 columns

    Could you please post the table schema, the current indexes and a couple of sample queries?

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