Forum Replies Created

Viewing 15 posts - 39,796 through 39,810 (of 49,552 total)

  • RE: Dynamic query

    peleg k (4/12/2009)


    is there a way to make a query on a Dynamic table name like this :

    Select * from Messag2008+@MonthName

    but withought using a dynamic query which will be activated...

    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?

    Jack Corbett (4/11/2009)


    So am I. The nice thing is I'm not expecting to be selected so I feel no pressure.

    I'm hoping they'll accept one of mine. Firstly because I...

    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 cant install the server components

    What operating system?

    What edition of SQL were you installing?

    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: Why Cursor is Slower?

    Wish (4/12/2009)


    I read many post suggesting to avoid cursor as it degrade the performance. But I am confised why cursor is slower.

    Because cursors are iterative, row-by row operations....

    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 Status SUSPECT

    Please post new questions in a new thread and include as much detail as possible, including any errors that you get as well as the stack dump, what causes 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: Which is more efficient or does it matter?

    Bob Hovious (4/11/2009)


    I just tested it and answered my own question. The Join on ShortCode+'%' did NOT interfere with the proper use of the index. ...

    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 is more efficient or does it matter?

    Bob Hovious (4/11/2009)


    I was thinking about the LIKE solution earlier, but that would make the join be

    INNER JOIN T2 ON LongCode like ShortCode+'%'

    Yup.

    Doesn't the ShortCode+'%' expression create the same problem...

    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?

    Jeff Moden (4/11/2009)


    I saw that Gail and Jack also made submittals.

    Grant also. He was a real early-bird and submitted before I'd even decided on titles.

    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: heap or clustered

    Post the exec plan for each please.

    While a heap is occasionally beneficial, in most cases it's better for a table to have a cluster. There's probably a missing index or...

    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 2005 Help

    Florian Reischl (4/11/2009)


    I remember a case my apprentice told me from one of his teachers, the "IF-loop". Sure a slip of the tongue, but anyway:

    DECLARE @i INT

    SET @i = 1

    START:

    PRINT...

    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: heap or clustered

    like this:

    CREATE TABLE [dbo].[test6](

    [callerid] [char](5) NOT NULL,

    [name] [varchar](50) NULL,

    [address] [varchar](50) NULL,

    [recordnum] [int] IDENTITY(1,1) NOT NULL

    primary key NONCLUSTERED ( callerid)

    ) ON [PRIMARY]

    GO

    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 is more efficient or does it matter?

    Bob Hovious (4/11/2009)


    Gail, do you have some authority for us on the joins using the LEFT function?

    Authority? I have some experience with it, if that's sufficient.

    Joins are the same...

    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: heap or clustered

    radek (4/11/2009)


    Hi,

    is possible create heap with primary key??

    Sure. Create the PK as a nonclustered index.

    ALTER TABLE ... ADD CONSTRAINT ... PRIMARY KEY NONCLUSTERED ....

    Im testing query... If I have clustered...

    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 is more efficient or does it matter?

    Vijaya Kadiyala (4/11/2009)


    Quesry using joins would be much more sclable...based on the little knowledge that i have but..but again its really depends on the use.

    Ex: If i have millions 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: T-SQL 2005 Help

    Bob Hovious (4/11/2009)


    You should feel safer now, too. 😉

    :rolleyes:

    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 - 39,796 through 39,810 (of 49,552 total)