Forum Replies Created

Viewing 15 posts - 25,171 through 25,185 (of 26,490 total)

  • RE: Query too slow

    Matt was on to something else. I looked at the indexes as well, and he is correct. I think you will see an improvement if you built an...

  • RE: Query too slow

    Would you please post the execution plan for the query. Oh, and no I don't know how you should do it, as I have never tried it myself, I...

  • RE: Query too slow

    Haritha Kodali (3/4/2008)


    Here is the view that the query is retrieving from. The earlier script is from DDL of the table that this view is using

    CREATE view "MAGICSSHD"."Incident" ...

  • RE: Query too slow

    Your table DDL doesn't match your query unless I missed something in all the code.

    😎

  • RE: Query too slow

    Also, what's wrong with just doing this:

    SELECT

    count(*)

    FROM

    [MAGICSSHD].[Incident] WITH (NOLOCK)

    WHERE

    [State:] = N'C'

    AND ([InActive:] = 0)

    ...

  • RE: Query too slow

    Besides formating your code, we could also use the DDL of the base table, including any and all indexes you have defined.

    😎

  • RE: How to lay out SQL Code

    Everyone has their own way of laying out code. This is how I like to do it using the example several have used in this thread:

    SELECT

    ...

  • RE: New test easily separates good code from bad!

    Guess I'll have to check this out from home. Can't view the site here at work.

    😎

  • RE: Generate subtotal and grandtotal records

    Time to ask a question, why the sub-total every 5 records? Seems to me this should probably be done on the application side, not the database side of things...

  • RE: 64-Bit Install Gotchas

    The only gotcha I would warn about is regarding SSIS packages. When you create an SSIS package with a script task, be sure to select the option to precompile...

  • RE: QUERY

    There is another way to do this, without using convert. The second select statement is equivalent to the first:

    select datediff(week, convert(varchar(6), getdate(), 112) + '01', getdate()) + 1

    select datediff(week,...

  • RE: Metadata - Database Drops

    Not that I am aware of, sorry. You can setup a DDL trigger to capture that event at a server level, or setup a trace to capture that as...

  • RE: I got burned today at a SQL Server Interview!

    I think the difference between a 5 of 10 and a 9 of 10 (to use a scale) isn't so much the amount of knowledge but more the intuitive thought...

  • RE: I got burned today at a SQL Server Interview!

    It isn't that we are trying to down play our knowledge, it just the more we learn, we learn that there is more we don't know.

    Maybe I am better than...

  • RE: I got burned today at a SQL Server Interview!

    Life lesson -- There is always something new to learn, even when you think you know it all!

    You can bury me when I stop learning.

Viewing 15 posts - 25,171 through 25,185 (of 26,490 total)