Forum Replies Created

Viewing 15 posts - 76 through 90 (of 1,082 total)

  • RE: Query seems very slow for what its doing

    Thanks.

    Ok so now it looks like we down to the Properties table. I did notice another lookup popout there, I'm sure you know how to remove that now, but it...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query seems very slow for what its doing

    Paul8112 (6/12/2009)


    I've just updated the statistics, and the query time is now down to 26 seconds.

    nice one.

    Ok could we get a new plan please.

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query seems very slow for what its doing

    could you also confirm that the stats are up to date?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query seems very slow for what its doing

    It's an option for the Property index I'm just worried about the impact of creating a LARGE index that is so wide just for this query...

    Might be worth trying to...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query seems very slow for what its doing

    Ok the other thing is are your stats up to date?

    I've noticed most of your estimated vs actual row counts vary largely, I'm not if this is stats out of...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query seems very slow for what its doing

    What type of field is ImageUrl?

    I think this should be added to your Property image covering index that should get rid of the Key Loopup for that table.

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query seems very slow for what its doing

    WOW Great post.

    Most people don't take the time to give as much info as you have thanks for that.

    For the execution plan, could you post the actual plan as a...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Date string in WHERE causes table scan instead of index seek

    Hi Sergiy,

    The index that I created to test the OP's problem definitely has a field in postion 1 that is of type 'BIT'.

    I do agree with you I would probably...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Date string in WHERE causes table scan instead of index seek

    Gail am I correcting in saying and I think I might have learn't or if I am wrong missunderstood, but ify ou have two columns in your where clause and...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Date string in WHERE causes table scan instead of index seek

    Joseph Fallon what order are the fields in your in covering index, this will make a difference.

    The other thing to look out for is that I'm pretty sure, but happy...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: SQL tuning

    As mentioned, please supply more information in the form of table structures queries and execution plans.

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: SQL tuning

    Hi,

    The first thing to remember is that the estimate execution plan is "estimated" and not "actual", so you can't trust it to be what will actually happen.

    Second the %'s from...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Help Needed ???

    Have you tried this?

    SELECT *

    FROM

    (

    SELECT ROW_NUMBER() OVER (ORDER BY GETDATE())as NUM, Id FROM @tbl

    ) p

    PIVOT (MIN(ID) FOR NUM IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10])) PVT

    You can just use the same sample data...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Function runs slowly, but each half run separately runs quickly

    Thanks Barry, I wasn't aware of that 🙂

    Learn't something new for the day .

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: using table as parameter

    could you give me an example of two tables with a few columns from each table and then the relationship for those tables in a create script and then I...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 76 through 90 (of 1,082 total)