Forum Replies Created

Viewing 15 posts - 41,896 through 41,910 (of 49,562 total)

  • RE: Need a tables column listing with keys

    sys.tables, sys.columns, sys.foreign_keys, sys.foreign_key_columns, sys.indexes where is_primary_key=1, sys.index_columns

    It's a nasty, very large query, but those are the tables needed. If you get stuck, post the query that you have.

    One other...

  • RE: Is it possible to move database from sql server 2005 to server 2000 ..??

    To add on to what Barry said, there is no way to take a backup of a 2005 database and restore it on 2000, nor is it possible to detach...

  • RE: Bookmark Lookup

    Peter D (1/7/2009)


    It may be hard to change this one as there are many jobs and Online processing using the tables and current indexes. Not much was...

  • RE: urgent query

    Lowell (1/7/2009)


    if you had read the chapter or listened to the lecture in class....

    Yeah, probably.

  • RE: Performance issues with SQL Server Stored Procedures

    Eeep. That's a lot of execution plans.

    I'm not looking at all of them. That'll take hours.

    A few highlights:

    Exec plan 3:

    The country table needs an index. CountryID INCLUDE name, or,...

  • RE: sql query

    Lynn Pettis (1/7/2009)


    GilaMonster (1/7/2009)


    Lynn Pettis (1/7/2009)


    hmmm, a question I sense here but not sure what you want.

    Are you channelling Yoda again?

    Sorry, caught a couple of the Star Wars movies on...

  • RE: sql query

    Lynn Pettis (1/7/2009)


    hmmm, a question I sense here but not sure what you want.

    Are you channelling Yoda again?

  • RE: urgent query

    IF EXISTS (SELECT 1 FROM SomeTable WHERE SomeKey = @SomeValue)

    UPDATE ...

    ELSE

    INSERT ...

    Edit: The question was (paraphrased)

    If I have a table and I want to check based on a...

  • RE: Lost MDF file but I have LDF file

    RBarryYoung (12/31/2008)


    [h2]If your data is important to you then Back It Up![/h2]

    And to add to that.

    Any backup not tested cannot be considered a valid backup. If it's worth backing...

  • RE: to INCLUDE or not to INCLUDE

    Steve Jones - Editor (1/7/2009)


    Why wouldn't you put all the columns in the index? This has puzzled me from day one. The index size is essentially the same in either...

  • RE: cannot understand why query analyzer is picking a specific index.

    Christopher Stobbs (1/7/2009)


    Hi Gail,

    After the first seek is done are the other filters done on the index or resultant dataset return from the first filter(Index seek)

    The latter.

    The index seek results...

  • RE: cannot understand why query analyzer is picking a specific index.

    Since all of the filters are inequalities, SQL can only seek on one of them. The other two have to be applied as a second step after the index seek....

  • RE: to INCLUDE or not to INCLUDE

    winston Smith (1/7/2009)


    which is better and why?

    create index index1 on table1 (col1, col2, col3)

    or create index on table1 (col1)

    include(col2, col3)

    Depends what you're trying to accomplish

    The first fully covers and...

  • RE: Performance issues with SQL Server Stored Procedures

    Use Statistics IO and Statistics Time when you're investigating the procs themselves, along with the exec plan, to see where the problem points are.

  • RE: Performance issues with SQL Server Stored Procedures

    gharris_35 (1/7/2009)


    Hi

    I have uploaded the estimated plan. See Estimated Plan.zip

    Did you check that before you posted? 😉

    Management studio saves plans one at a time, so all that's attached is...

Viewing 15 posts - 41,896 through 41,910 (of 49,562 total)