Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SharePoint リスト Deep Dive / Deep-dive on SharePo...
Search
Takashi Shinohara
November 19, 2016
Programming
980
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SharePoint リスト Deep Dive / Deep-dive on SharePoint list
(2017/11/30) ロック エスカレーションに関する記載について修正しました。
Takashi Shinohara
November 19, 2016
More Decks by Takashi Shinohara
See All by Takashi Shinohara
Microsoft Build 2026 振り返り会 / Recap Microsoft Build 2026
karamem0
0
160
Microsoft 365 Copilot API を試してみる / Trying out Microsoft 365 Copilot APIs
karamem0
0
240
Microsoft 365 の認証と承認を理解する / Understanding Microsoft 365 Authentication and Authorization
karamem0
0
270
Power Automate のパフォーマンス改善レシピ / Power Automate Performance Improvement Recipes
karamem0
0
620
どっちの API SHOW?SharePoint 開発における SharePoint REST API Microsoft Graph API の違い / Which API show? Differences between Microsoft Graph API and SharePoint REST API
karamem0
0
2.6k
Microsoft Ignite 2024 最新情報!Microsoft 365 Agents SDK 概要 / Microsoft Ignite 2024 latest news Microsoft 365 Agents SDK overview
karamem0
0
670
徹底解説!Microsoft 365 Copilot の拡張機能 / Complete guide to Microsoft 365 Copilot extensions
karamem0
1
4.8k
Microsoft Search の Graph コネクタ ハンズオン / Handson for Graph Connector of Microsoft Search
karamem0
0
400
いまだから「検索」を語ろう! SharePoint FAST Search から Microsoft Search セマンティックインデックスまで / Let's talk about search now
karamem0
4
2k
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
160
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
310
AWSに止められる覚悟してますか?
morizo_1984
2
540
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
R8 の設定見直しでアプリサイズ削減
andpad
0
220
カツオ、ご期待ください
suneo3476
0
190
AmebaブログはKMPから卒業します
kmars0605
0
190
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1.3k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
My Coaching Mixtape
mlcsv
0
360
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
4 Signs Your Business is Dying
shpigford
187
23k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Transcript
SharePoint リスト Deep Dive 篠原敬志 (@karamem0)
自己紹介 • 篠原敬志 (Takashi Shinohara) • Twitter: @karamem0 • Blog:
からめもぶろぐ。(http://blog.karamem0.jp) 2
はじめに • SharePoint は自由にカスタマイズ可能であることが大きなメリットです。 SharePoint を基盤としたシステム開発が数多く行われています。 • しかし SharePoint には製品独自のクセがあるため、通常の
ASP.NET 開発と同 じ手法だと、動かないシステムを構築してしまうことになります。 • 中でも特に重要なリストとの上手な付き合い方を紹介します。 3
スコープ 4 論理層 ファーム Web アプリケーション サイト コレクション サイト リスト/ライブラリ
物理層 サーバー IIS コンテンツ データベース テーブル オブジェクト SPFarm SPWebApplication SPSite SPWeb SPList
リスト≠データベース 5
リストを使うメリット • データ型 • フォーム / ビュー • アクセス許可 •
ワークフロー / イベントレシーバー 6
リストの実体 • リスト定義は [dbo].[AllLists] テーブル • Schema.xml の内容も圧縮バイナリ データとして格納されている •
リスト データは [dbo].[AllUserData] テーブル • 汎用的に入る設計 • bit1~bit1000、datetime1~datetime550、float1~float550、 int1~int750、ntext1~ntext262、nvarchar1~nvarchar262 • スパース列なので tp_ColumnSet を参照すればデータが入っている列だけを XML 形式で取得可能 7
リスト データの取得プロセス (ざっくり) 8 AllLists テーブルからリスト スキーマを取得 AllUserData テーブルからリスト データを取得
アクセス許可にしたがってフィルター リスト スキーマとリスト データをマッピング
リスト データの取得は時間がかかる 9
リスト データの取得のベスト プラクティス • リストにインデックスを付ける • 実際のプロジェクトでは 2 割程度の改善実績 •
CAML を使用する • SPList.Items は全部のデータを見に行ってしまうので CAML を使って取得する 内容を最低限にする • SPListItemCollectionPosition を使ってページングする • CAML よりは LINQ to SharePoint のほうがいいかも • リストへの直接アクセスをやめる • バッチやイベント レシーバーでリスト データをデータベースにコピー • データベース?そこに SQL Server があるじゃろ( ^ω^) 10
5000 件問題 • 5000 件を超えるリストに対してさまざまな制約がかかる • 根本的には SQL Server のロックのエスカレーションが原因
• [dbo].[AllUserData] には 1 以上のサイト コレクションのリスト データが含まれる ので表ロックされるととんでもないことに • 実際はロック エスカレーションが発生する前に WebApplication のしきい値でブ ロックされる 11
ただし SharePoint 2010 まで SharePoint 2013 ではロック エスカレーションは無効化されている 12
5000 件問題のベスト プラクティス • リストを細かい単位で分割する • 年度ごと、組織ごと、etc... • サイトごとテンプレート化しておけば展開も簡単 •
コンテンツ データベースの容量も気にする場合はサイト コレクションを分割する • コンテンツ クエリ検索を使用する • リストが分割されていてもクエリは 1 つ • リアルタイムを要求される検索には不向き • 事前に管理プロパティを登録しておく必要がある • どうしてもリストを分割できない場合はしきい値を変える • ただし SharePoint Online ではできない 13
リストのリレーション • SharePoint の参照列は他のリストにリレーションを持つことが可能 • ただし データベースのリレーションと同じと思っていると死にます (※死にました) 14
リストのリレーションの制約 • 参照は片方向のみ、逆方向は参照できない • 参照先のリストで使える列は 1 つのみ • 1 つのリストに設定できる参照列は
12 まで (変更可) • カスケード (参照整合性) はできる 15
リストのリレーションのベスト プラクティス • リストは正規化しない • リストを分割すると検索にも影響あり • ただしあまり列を作りすぎると SQL Server
で複数行が作成されパフォーマンス が悪くなるので注意 • リレーションの代わりに選択肢列や用語セットを使用する 16
まとめ • リスト≠データベース • リストはテーブルと非常によく似ているが、SharePoint 特有の制限があるため、慎 重に設計しないと面倒なことに • メリットもあるのでご利用は計画的に 17
参考リンク • 大きなリストを設計し、リストのパフォーマンスを最大限に高める (SharePoint Server 2010) https://technet.microsoft.com/ja-jp/library/cc262813.aspx • ソフトウェアの境界と制限 (SharePoint
2013) https://technet.microsoft.com/ja-jp/library/cc262787.aspx • ロックのエスカレーション (データベース エンジン) https://technet.microsoft.com/ja-jp/library/ms184286.aspx 18
参考リンク • SharePoint と SQL ブロッキングの話 https://blogs.technet.microsoft.com/sharepoint_support/2012/07/02/ sharepoint-sql-part1/ https://blogs.technet.microsoft.com/sharepoint_support/2012/07/04/ sharepoint-sql-part2/
https://blogs.technet.microsoft.com/sharepoint_support/2012/07/11/ sharepoint-sql-part3/ • リスト ビューのしきい値に関する FAQ https://blogs.technet.microsoft.com/sharepoint_support/2015/04/14/ faq/ 19