Forum Replies Created

Viewing 15 posts - 136 through 150 (of 6,036 total)

  • Reply To: performance tuning

    Jeffrey Williams wrote:

    ... you can probably just remove the CTE.

    +1

    You definitely would do better without CTE.

    And I'd also changed the order of appearance of the objects in the query - to...

  • Reply To: Top 1 makes very fast query into very slow query

    Output of the splitter function is not used anywhere in SELECT, further JOIN or ORDER BY.

    Therefore it's better be not in INNER JOIN but in WHEE EXISTS check:

  • This reply was modified 3 years, 7 months ago by  Sergiy.
  • Reply To: Periodic kernel-level CPU spikes affect client connections and executions

    You mentioned it's a VM.

    Did you check what's going on on other VM's sharing the same physical Server?

    What's going on on the physical server itself?

  • Reply To: Huge size of Reporting tables

    S_Kumar_S wrote:

    For choice of clustered index columns, I am confident that they are correct. They are int or bigint columns and are very frequently used in many queries.

    on an average...

  • Reply To: Huge size of Reporting tables

    Yes, the point is excellent, and to me it seems there is no question.

    If you have a look at the topic starter:

    tables have 1 month worth of data

    there will no...

  • Reply To: Huge size of Reporting tables

    S_Kumar_S wrote:

    Some of my queries return upto 15 million records which gets pushed to a temp table.

    Does not look like a good choice of querying strategy.

    It's never a good idea...

  • Reply To: Huge size of Reporting tables

    I mean , we don't face high CPU, Memory or IO latency.

    What kind of issues do you face then?

    What's the bottleneck which makes your procedures slow?

  • Reply To: Growing Outside of the English World

    Remember to exercise some caution when entering new worlds.

    Don't be like that romantic couple from Washington who went travelling around the world to bring love and understanding to troubled parts...

  • Reply To: COUNT(ID COLUMN) not using Clustered Index

    Clustered index contains all the data pages on its leaf level. Therefore scanning a clustered index on any table will be more expensive operation than scanning any of non-clustered indexes...

  • Reply To: SQL Agent Job is stuck

    I created [_sandbox] database for this purpose, deployed the script and scheduled it to run every minute.

    It's been 15 or 20 executions since then - no issues.

    I'm telling you -...

  • Reply To: SQL Agent Job is stuck

    Check what's going on with msdb. Where are the files located, size of it, any spikes, available space, locking, etc.

  • Reply To: DATEDIFF() for times over a day long

    Just remembered a thing about insufficiently specified requirements.

    A wife sends her husband to a grocery shop:

    - Buy a loaf of bread and if there will be eggs buy a dozen.

    20...

  • Reply To: DATEDIFF() for times over a day long

    Jeff Moden wrote:

    Shifting gears a bit, I was just a bit disappointed because you obviously have a function.  How difficult would it have been to simply post it as a function?...

  • Reply To: how to improve the remote scan and remote query performance

    Remote scan usually means copying the remote table to local memory (tempdb) in its entirety and then scan it locally.

    If the same object is scanned repeatedly it might make sense...

  • Reply To: DATEDIFF() for times over a day long

    Well, dbo.HHHMMSS2DATETIME is a function.

    But the overall solution is a script, true. But I don’t see it as a problem, it’s a feature! 😀

    I don’t know how the duration is...

  • Viewing 15 posts - 136 through 150 (of 6,036 total)