Forum Replies Created

Viewing 15 posts - 2,011 through 2,025 (of 2,462 total)

  • RE: Best way to transpose multiple rows onto 1 row?

    Always post table defintion , index definition and sql code to get response faster

    and also spend some time with the link For Quick Result in my signature.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Debugging T-SQL

    i guess you have stored proc which creating problem if yes then u can ignore it's above part

    like

    create proc sp_name ( id int , parma varchar(300))as

    and use remaining...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Do i need here any index ???

    Grant Fritchey (3/26/2010)


    You do know, as that table scales, this query will become slower and slower.

    Frankly tell you this would be a intermediate/ working table ( prefebly a temp...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: 2005 SP3 install

    This can help you select serverproperty ('productlevel')

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: what is Index rebuild and reorganize ----

    Refer this link alsohttp://technet.microsoft.com/en-us/library/ms189858.aspx

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: what is Index rebuild and reorganize ----

    Rebuilding Indexes

    Rebuilding an index drops and re-creates the index. This removes fragmentation, reclaims disk space by compacting the pages based on the specified or existing fill factor setting, and reorders...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: staging table and indexes

    Interesting

    Rob Schripsema (3/25/2010)


    If you're talking about a non-clustered index, I think I would drop the index after truncating the table, then import the new data, then re-create the index.

    ...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Looking for feedback on Storing 'DM_DB_INDEX_USAGE_STATS' results over a deinfed period for analysis

    i am sure you must be aware of below text but i am just giving you bit support

    Query to Identify Indexes that are not being used use dbname

    go

    SELECT o.name Object_Name,

    ...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Get minimum data without using MIN() function

    Paul White NZ (3/25/2010)


    What do you mean here? Having an index prevents a seek???

    I guess optimizer will not use seek for HAVING MIN(Date).What do you think ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Get minimum data without using MIN() function

    karthikeyan-444867 (3/25/2010)


    Actually the table has more than 100000 records. So if i execute query like

    select Assetid,min(date)

    from t1

    group by assetid

    having min(date) <> inceptiondate

    it is taking 1 minutes.

    if you have index on...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Get minimum data without using MIN() function

    select assetid,date

    from

    (

    select assetid,date, row_number () over (partition by assetid order by date ) rowid from t1

    WHERE date < inceptiondate ) t

    WHERE t.rowid = 1

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: T-SQL CASE Problem

    @BrainDonor

    WHERE

    (@CompanyLetter = 'ALL')

    OR

    ((@CompanyLetter = 'OTHER')...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Can this CTE based query be written more efficiently?

    after seeing Execution plan, i should say CTE query working better the PIVOT one.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Can this CTE based query be written more efficiently?

    try this select TransactionID,

    sum(TOT) as TOT,

    sum(UniqueEnvs) as UniqueEnvs,

    sum(GBX) as GBX,

    sum(IEX) as IEX,

    sum(UNK) as UNX,

    DateTimeReceived

    ...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Any harmful effect when setting AUTO_UPDATE_STATISTICS_ASYNC on?

    Chan Wai Yin (3/24/2010)


    Is there any harmful effect on setting this option or any important concern need to take care?

    From any blog :

    [font="Verdana"]It is necessary to have AUTO_UPDATE_STATISTICS enabled first...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 15 posts - 2,011 through 2,025 (of 2,462 total)