If a table has Hundreds of millions data,how to do grouping operation in SQL Server 2008?
who can gave me some suggestion?
thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Misunderstandings.
Hundreds of millions = small. I know a table we work on my probject tha gros around 60 million per day, and I have a data set that gros 600 million entries per day.
SQL has grouping operations, you know.
Now, you state “entity framework” as tag. Hereis the deal: you do not use business objects for groups as groups have no functionality anyway and are pure read only projections.
Go SQL (either direct or with a capable LINQ provider). GROUP BY is a SQL Command you may want to read up on.
If oyu need repeatable read, then a materialized view on the server may work, or inserting the data into another table for fast access. Depends a lot on the usage pattern. And make sure you actually have hardware capable enough for your required usage (which I agree many people will never understand). Given proper hardware (Exadata shines here, but it start i thin kat a quarter million USD or so per cluster) you can pull of billion row aggregations in nearly real time.