Forum Replies Created

Viewing 14 posts - 91 through 104 (of 104 total)

  • RE: Query Performance

    I did and it ran for a LONG time. Over 20 minutes. I had to stop it. :-/

  • RE: Query Performance

    GSquared (4/7/2009)


    I can't test this, so I'm not sure if it'll work, much less whether it will be faster, slower, etc., than the current version. Can you test it...

  • RE: Query Performance

    Chris Morris (4/7/2009)


    Change this...

    ---

    d.loginTime,

    ---

    d.loginTimeSeconds,

    ---

    d.LogoutTime

    ---

    to this...

    ---

    MAX(d.loginTime) AS loginTime,

    ---

    MAX(d.loginTimeSeconds) AS loginTimeSeconds,

    ---

    MAX(d.LogoutTime) AS LogoutTime

    ---

    19 minutes...

  • RE: Query Performance

    Chris Morris (4/7/2009)


    Change this...

    ---

    d.loginTime,

    ---

    d.loginTimeSeconds,

    ---

    d.LogoutTime

    ---

    to this...

    ---

    MAX(d.loginTime) AS loginTime,

    ---

    MAX(d.loginTimeSeconds) AS loginTimeSeconds,

    ---

    MAX(d.LogoutTime) AS LogoutTime

    ---

    So far,...

  • RE: Query Performance

    Chris Morris (4/7/2009)


    Try this, Donato:

    DECLARE @Startdate DATETIME, @Enddate DATETIME

    SELECT @Startdate = convert(datetime, '02-APR-09' + ' 03:00:00', 101),

    @Enddate = convert(datetime, '02-APR-09' + ' 20:00:00', 101)

    --

    SELECT itl.user_id, au.notes, au.shift,

    --

    sum(update_qty...

  • RE: Query Performance

    I get: Column 'd.loginTime' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

  • RE: Query Performance

    donato1026 (4/7/2009)


    I wish there was a tool out there that analyzed your queries and syntax and made suggestions on how to improve upon it.

    Good point.

    Anyone have any other ideas in...

  • RE: Query Performance

    I wish there was a tool out there that analyzed your queries and syntax and made suggestions on how to improve upon it.

  • RE: Query Performance

    OHHH! Ok. Sorry...

  • RE: Query Performance

    Chris Morris (4/7/2009)


    As Grant and GSquared have pointed out, there's abundant scope for improvement in this query, to make it fast and to make it pretty. Here's the first query...

  • RE: Query Performance

    Chris Morris (4/7/2009)


    As Grant and GSquared have pointed out, there's abundant scope for improvement in this query, to make it fast and to make it pretty. Here's the first query...

  • RE: Query Performance

    I have made the CREATE TABLE scripts for now... I can post those and then get sample data over. Would that help?

  • RE: Query Performance

    Like I said... Being new at this, I am not sure what the best way is to do this. I just know it runs VERY slow. A little...

  • RE: Query Performance

    Thank you for you response.

    This is code left over from the person I replaced. However, I am not an SQL person per se... So, that being said, I'm...

Viewing 14 posts - 91 through 104 (of 104 total)