網誌分類:IT |
最近公司有個task 要做一個olap 出黎, 抽數果part 基本上用乜寫都無乜所謂, 見有新野出左見有機會就即刻試下
基本上linq 同我寫開axapta 既x++ d sql 好類似 (又係唔似sql statement 但可以做相同既野, 不過據我睇返sql profiler , 佢譯出黎d sql 唔係optimal for performance , 好似你寫句 from c in tables group c.key into g select {g.key, g.sum(a), g.sum(b)...etc; 你唔好以為佢同你變呢句wor select key, sum(a), sum(b), sum(c) from table1 group by table1.key 佢其實係同你 select * from table1 where .....; 之後你要sum 果時佢先係memory 同你計. 因為佢仲可以即場做distinct , count 等動作, 所以佢其實都係select 曬咁多條, 入曬memory 先算. 是好是壞做見環境喇! 以下係呢幾日常到網站
Microsoft official 的教學網站 , 有101 個sample, 不過多數係用arraylist, 無教你點同sqlsever 一齊用
http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx
國內mvp 的blog, 有由淺入深教你一步一步開始用linq with sqlserver
http://lovecherry.cnblogs.com/




開心豬的寒舍 未有任何已發表的網誌

