Rabu, 25 Agustus 2010
Database assisted denormalization
Let us say that I have the homepage of the application, where we display Blogs with their Post count, using the following query:select dbo.Blogs.Id, dbo.Blogs.Title, dbo.Blogs.Subtitle, (select COUNT(*) from Posts where Posts.BlogId = Blogs.Id) as PostCount from dbo.Blogs Given what I think thoughts of denormalization, and read vs. write costs, it seems a little wasteful to run the
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar