Forum Replies Created

Viewing 15 posts - 931 through 945 (of 1,347 total)

  • RE: Bookmark Lookup question

    You'll need to post the DDL of the tables & indexes. It's just guesswork without that.

     

  • RE: Is this a "Bug" of SQL2000?

    select object_name(id), max(colid)

    from syscomments

    group by object_name(id)

    having max(colid) > 4

    No rows returned.

    *shrug*

    Code was posted just for concept. Obviously to make it completely bulletproof for any environment you'd add enough joins up...

  • RE: Is this a "Bug" of SQL2000?

    I think you're making things more difficult than they need to be. Use SQL server and left joins to get all the parts, then concatenate on the client. The C#...

  • RE: SQL Serve Not using indexes

    The index on FiscYrMo is NON-clustered.

    Fiscal Year/Month by itself is a bad candidate for a NON-clustered index - over 4.7 million rows, it is nowhere near *selective* enough...

  • RE: 100% Fill Factor. When to use it?

    >>I have three unclustered indexes set at 100% fill factor. 

    Do you have a clustered index ?

     

  • RE: Federated Databases In Data Warehousing

    What column would you be partitioning on ? How have you determined that it's even necessary to partition ?

     

  • RE: Reusing calculated columns

    Or, to avoid replicating the expression (which is a potential cause of code maintenance issues down the road), use a derived table ...

    SELECT prodweekend, fn_somefunction(prodweekend) as calccolumn

    FROM

    (

      SELECT [Due Date]...

  • RE: Primary key of type VARCHAR

    How about a composite 2 column key, your varchar plus an int identity ?

  • RE: Long query with Table Spool

    Just select the objects in EM and generate a SQL script, setting the options to script keys & indexes.

    A table of 2+ million rows being scanned is definitely not desirable....

  • RE: Long query with Table Spool

    Probably best to post the DDL of all tables/views involved.

    What size is the loginlog table ? It has a clustered index scan which migth be costly depending on its...

  • RE: Long query with Table Spool

    Re-write as an EXISTS, rather than IN sub-query:

    UPDATE #branch_users

    SET greenlight = 1

    FROM #branch_users As B

    WHERE EXISTS (

      SELECT *

      FROM appian.dbo.users USERS

        JOIN dealerinfo.dbo.v_DealerBranches DB ON DB.dlrcode = USERS.dlrcode

        JOIN...

  • RE: Delete is so slow, help

    Look carefully at the constraints.

    ON DELETE CASCADE.

    A *parent* question ID is being deleted. Which may delete more than 1 record from vts_tbQuestion. Which will cascade and delete multiple records from...

  • RE: Puzzler

    Can you post the table DDL and a small sample set of data that causes the problem ?

    I can't explain it, but IMO, it helps maintenance-wise to use NOT EXISTS...

  • RE: Exists Keyword

    >>Just a question. Woudn't  (Select 1 From GenNum where So = @Seroff) would be more efficient?

    To elaborate more - you can always spot the old Sybase T-SQL developers,...

  • RE: A question of speed..

    Did you "DBCC DropCleanBuffers" before each test so that you are comparing apples to apples ?

    Did the 1st import (without index) require the database to auto-grow ?

    Did you drop &...

Viewing 15 posts - 931 through 945 (of 1,347 total)