Forum Replies Created

Viewing 15 posts - 49,231 through 49,245 (of 49,552 total)

  • RE: Problems with Update Trigger

    As written every time it runs it does one or more selects from inserted and 14 inserts

    If  update(blz)

    select * from inserted

    INSERT INTO [eGecko3_Tr].[dbo].[Änderungen_Spender] (Spender_ID, [Name], Vorname, Telefon, [Straße], Land, PLZ,...

    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: best way to copy active table

    If I'm going to do an insert across linked servers, it looks like this

    Insert into LocalDB.dbo.tbl (<fieldlist&gt

    SELECT <fieldlist> FROM RemoteServer.RemoteDB.dbo.OtherTbl

    Be very careful of 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: best way to copy active table

    Greg. It's quite irrelevent where in the column order the primary key is. I assume that your primary key is clustered (since it's the default)

    The data will be stored on...

    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: best way to copy active table

    Regarding the 27 million rows... No cross joins, no bad connections (local machine to local machine), Table we were pushing into had a clustered index. TempDB is free to grow,...

    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: Fixed value in select

    Select date, category, count(*) AS cnt from MyTable

    Group By date,category

    UNION ALL

    Select date, 'Target' AS category, 30 AS Cnt from MyTable

    Group By date

    That's one solution. I'm sure there are others.

    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: best way to copy active table

    Try copying those 800000 records to another server without DTS. Select ... Into ... across a linked server is painful to say the least.

    Also the 'school-of-hard-knocks code' can give problems...

    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: The clause in a simple select statement

    This one will also work.

    SELECT * FROM TableA LEFT JOIN TableB ON TableA.ID=TableB.ID

    WHERE TableB.ID IS NULL.

    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: Question of the Day for 13 Jan 2006

    Well you start by firing the DBA who let a developer make changes directly in production.

    Code moves from dev to QA to Prod, not the other way around.

    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: best way to copy active table

    If you use DTS (which can be very, very fast in the right conditions) specify a query instead of a table and add the with (nolock) clause. That will ensure...

    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: Execution plans

    How did you copy the database from production?

    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: Execution plans

    Second the question of what exacly you did with the indexes.

    How big is the table in question?

    It is indeed acceptable for the execution plans to differ. On my production 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: What motivates you?

    I do a lot of query optimisation at the moment.

    I love the feeling that accompanies getting a 5 minute query run in 5 seconds

    The odd occation when a user...

    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: Question 70-229

    Understanding locking is essential if you find yourself administering a heavily-used database (or one with very bad queries and indexes)

    Understanding the basics will take you a long way.

    the main...

    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: Indexing dilemma in Sql Server 2000

    The best choice for a clustered index is a column that is narrow, evver increasing and unique. The closer you get to that, the better. The PK is not always...

    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: Question 70-229

    The questions you'll get in the exam are selected at random from a large pool. Hence you may or may not get any questions on locks.

    What's the problem you have...

    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 - 49,231 through 49,245 (of 49,552 total)