問:sql
Hi,ide
I have a table workcachedetail with 40 million rows which has 8 columns.We decided to partition the table.Most of the queries in our environment uses 4 columns in the where clause or joins.If I partition the table with 4 columns then I may get better performance.Can we partition the table on multiple columns(like partitioning on id,deptid,designation)?函數
Thanks,sqlserver
答:spa
noorm
You can partition by creating a persisted computed columns.server
意思就是,目前SQL Server還不支持將多個列做爲分區函數的分區依據,只能用一列做爲分區函數的分區依據,可是咱們能夠將多個列構造爲一個計算列(computed columns)來做爲分區依據。ci
參考文獻:get