Home Forums SQL Server 2012 SQL 2012 - General Is there a fast way for SQL to do a Group By Count on items within a group? RE: Is there a fast way for SQL to do a Group By Count on items within a group?

  • isuckatsql (5/2/2014)


    Kevin,

    You are correct!

    I am not sure on the best way to do this.

    Based on the Microsoft Outlook scenario, i assume you would need one SP for each of the folders: Inbox, Sent, Junk.....etc.. which i'm sure would be horribly slow.

    One of the suggestions made was to hold all the records in memory, then make the counts based on the records contained only in memory. Then update the records in memory every two hours.

    Any other ideas?

    Thanks

    Ian

    I'm not sure what this recommendation is based on...

    Before SQL2014 you cannot really control what data will be hold in memory and for how long.

    How would such a suggestion be implemented to work undereach and every condition? What SQL command would you use to "force" it into memory?

    Or am I missing something here?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]