Forum Replies Created

Viewing 15 posts - 16 through 30 (of 121 total)

  • Reply To: Best Index Choices

    ScottPletcher wrote:

    I suggest creating the following indexes to support the query.  If you'd like to adjust other indexes on the tables also, just let me know.

    CREATE UNIQUE...
  • Reply To: Best Index Choices

    Sergiy wrote:

    Can you please run this

    SELECT TOP 10 item_no, loc, COUNT(*) NN
    FROM IMLSMST_SQL
    GROUP BY item_no, loc
    HAVING COUNT(*) > 1
    ORDER BY NN DESC

    and post here the outcome?

                

    July 21, 2021 at 2:14 pm

    #3912474

  • Reply To: Best Index Choices

    Results attached.

    Attachments:
    You must be logged in to view attached files.
  • Reply To: Best Index Choices

    ScottPletcher wrote:

    I can't offer index recommendations without seeing the DDL for the tables, including all current index definitions.  The most critical index is the clustered index, so that should be...

    • This reply was modified 3 years, 2 months ago by  Jackie Lowery.
    Attachments:
    You must be logged in to view attached files.
  • Reply To: isnull returns wrong number of spaces (i think)

    Thanks guys.  The coalesce solution is what I needed.  Phils solution would work, except I want to return an empty string if there's less than 2 characters.

  • Reply To: isnull returns wrong number of spaces (i think)

    I guess i should say the goal here is to do a :

    left(column1,len(column1)-2)

    and I'm trying to account for Null or Empty fields so the left function doesn't...

  • Reply To: Statistics Update Frequency

    I didn't know of the new persisting sample percent feature.  Thanks for that info.  I found a query that shows the date statistics were updated and days since last update. ...

    • This reply was modified 3 years, 6 months ago by  Jackie Lowery.
  • Reply To: Order By Slowness

    Jeff Moden wrote:

    Jackie Lowery wrote:

    I may not have had to rebuild them, but doing a full sample on the statistics definitely fixed the slowness.

    Should I have to do a full sample on...

  • Reply To: Order By Slowness

    I may not have had to rebuild them, but doing a full sample on the statistics definitely fixed the slowness.

    Should I have to do a full sample on the statistics...

    • This reply was modified 3 years, 10 months ago by  Jackie Lowery.
  • Reply To: Order By Slowness

    I found that i can add:

    	@StatisticsSample = 100 ,

    to the script.  I run this script on Fridays at 10PM.  Is there any reason I shouldn't set the...

  • Reply To: Order By Slowness

    I finally found what i was doing that had sped up the query.  I rebuilt the index manually.  Normally, my indexing is done by Ola Hallengren's maintenance scripts, but it...

  • Reply To: Order By Slowness

    Now I'm really confused. The problem seems to have come back.  It's taking 4 to 5 seconds again.  If I remove the TOP 1 part it returns 32 rows.   When...

    • This reply was modified 3 years, 10 months ago by  Jackie Lowery.
  • Reply To: Order By Slowness

    Oddly enough, rebuilding the indexes on the wspkg and wspkglin tables fixed the issue.

  • Reply To: Large difference in Actual rows vs Estimated rows

    If the value passed matches the histogram for 66,000 rows, wouldn't the estimate  be high not low.  Again, I'm stupid on this, so sorry if I'm not asking the wrong...

  • Reply To: Large difference in Actual rows vs Estimated rows

    Again.  Thanks for the help.  I don't understand why the estimate is so low.  There's a big difference between 1200 rows and 66,000 rows.  It causes a problem when displaying...

Viewing 15 posts - 16 through 30 (of 121 total)