İçeriğe geç

Sahiplik, Üst Kayıt ve Arama Çarpıklığı

19 dilde daha mevcut

English · Español · 日本語 · Português (Brasil) · Français · Deutsch · Italiano · 한국어 · 简体中文 · Português (Portugal) · 繁體中文 · Bahasa Indonesia · Polski · Tiếng Việt · ไทย · Українська · Español (México) · Français (Canada) · Deutsch (Schweiz)

A wall of identical mailboxes, all neat and closed except one, forced open and stuffed, with letters and parcels piled on the floor beneath it.
Görsel yapay zekâ ile üretilmiştir

Data Architect kursunun 7. bölümü olan Ölçek İçin Tasarlamak bölümündeki 4 modülden 2.‘si. Her modül kendi başına okunabilir. Önceki: Hacim Her Şeyi Değiştirdiğinde · Sonraki: Hacim Paylaşım Modeliyle Buluştuğunda

Bu modülün yanıtladığı soru: Çok fazla kayıt tek bir şeye işaret ettiğinde ne olur?

Büyük veri hacmi sorunları her zaman çok fazla kayıtla ilgili değildir. Bazen aynı şeye bağlı çok fazla kayıtla ilgilidir: tek bir sahip, tek bir hesap, tek bir üst kayıt, tek bir arama değeri. Trafiği düşünün. Bir şehirde milyonlarca araba olabilir ve şehir yine de işler. Sorun, herkes akşam beşte aynı otoyol çıkışını kullandığında başlar. Toplam önemlidir, yoğunlaşma da. Bu yoğunlaşmalara sıcak noktalar diyorum; Salesforce bunlara veri çarpıklığı (data skew) diyor. Birkaç türü vardır ve hepsinin altında tek bir fikir yatar: modeldeki tek bir noktada birleşen çok fazla etkinlik.

The easiest to picture. One account with 100 contacts: nothing unusual. A thousand: probably fine. Ten thousand: now I’m paying attention. My design rule is no more than about 10,000 children under one parent, and Salesforce’s guidance draws the same line: “a large number of child records (10,000 or more) with a single parent account” is a common cause of poor performance (Parent-Child Data Skew (yeni sekmede açılır)). Salesforce’s own example shows why. Put 300,000 contacts under one account. A user who can see one of those contacts gets implicit access to the account. When that user loses access to the contact, Salesforce has to check the other 299,999 contacts before it can decide whether to remove the user’s access to the account. Do that for many users at once, and it gets expensive. Salesforce also names one way to take part of that cost away: where your security requirements allow, set the child object to Controlled by Parent, so there are no parent implicit shares to maintain (same source). In practice, it’s the most common skew I see, and I’ve seen users notice visible lag at around 20,000 children under one parent. Where somebody feels it depends on what the system is doing. That’s why 10,000 is a design threshold, not a promise that record 10,001 breaks anything. The real question is: why are all these records pointing at the same parent? ⟲

Same contacts, different concentration Three hundred dots, each standing for 1,000 contacts. Step 1: every dot has a line to one account, Unassigned Contacts, drawn in amber with a glow: 300,000 contacts on one account, 30 times the 10,000 threshold. Step 2: the same dots in the same places, now green, with their lines spread evenly across 30 small accounts, Unassigned 001 to Unassigned 030: 30 accounts, no more than 10,000 each. each dot = 1,000 contacts Unassigned Contacts 300,000 contacts → 1 account 30 × the 10,000 threshold © 2026 Twinshark LLC · stevetecharc.com
Büyütmek için tıklayın

Step 1 of 2: every line points at one account. That’s the hot spot. ⟲

The classic case is contacts with no real account. Somebody decides every contact needs an account, so they create Unassigned Contacts and put every contact without an account there. Problem solved, until there are 300,000 contacts under it. We created an artificial hot spot because the model required us to put everything somewhere, and the relationship doesn’t even carry business meaning. It worked beautifully at 500 records. Then the Number of Zeros caught up with it. ⟲

What do you do when you’ve got a million contacts under it? I’ve seen child accounts by state, one unhandled-contacts account per state. I’ve seen an automatic version: whenever an account reaches 10,000, create another one. It can be a little awkward, but it spreads the load. ⟲

One answer is an account pool: Unassigned Contacts 001, 002, 003 and so on, with the children spread across them, each kept under the threshold. It works, and it’s Salesforce’s own advice: “Distribute child records so that no parent has more than 10,000 child records,” and for contacts without real accounts, “set up several dummy accounts and distribute the contacts among them” (Best Practices for Deployments with Large Data Volumes: General (yeni sekmede açılır), Winter ‘27). But those aren’t real accounts; they’re architecture artifacts. Users will ask who “Unassigned Contacts 017” is and why it’s in their search results. So when I use a pool, I hide the placeholder parents from normal business experiences as much as I can. It’s a recurring trade-off: sometimes scale forces a structure that exists for the platform, not the business. When it does, don’t pretend it’s business data. Name it, document it, hide it where appropriate. ⟲

Same contacts, different concentration Three hundred dots, each standing for 1,000 contacts. Step 1: every dot has a line to one account, Unassigned Contacts, drawn in amber with a glow: 300,000 contacts on one account, 30 times the 10,000 threshold. Step 2: the same dots in the same places, now green, with their lines spread evenly across 30 small accounts, Unassigned 001 to Unassigned 030: 30 accounts, no more than 10,000 each. each dot = 1,000 contacts Unassigned 001 Unassigned 030 30 accounts no more than 10,000 each © 2026 Twinshark LLC · stevetecharc.com
Büyütmek için tıklayın

Step 2 of 2: the same contacts, spread across a pool. Nothing moved but where they point. ⟲

Contacts under an account are a lookup. Master-detail is a different decision, and it’s one you make in the data model, long before the records arrive. Here’s the question I ask in class: would an invoice ever have more than 10,000 line items? No, it never would. So an invoice and its lines can be master-detail all day long. Now ask the same question of every master-detail relationship you’re about to build: at the volume we expect, will one parent ever pass 10,000 children? ⟲

Salesforce draws the same line: “As a best practice, don’t exceed 10,000 child records for a master-detail relationship” (Considerations for Object Relationships (yeni sekmede açılır)). Master-detail is the strongest relationship Salesforce gives you, and that’s exactly why the number matters. The detail record has no owner of its own; its access is controlled by the parent. Delete the parent, and every child goes with it. A child can’t move to another parent unless you allowed reparenting. Roll-up summaries on the parent have to keep up as the children change. And saving a child can lock the parent, which is why Salesforce’s loading advice is to group child records by their parent “to minimize locking conflicts” (Loading Data from the API (yeni sekmede açılır)). With ten children, none of that is noticeable. With a hundred thousand, every one of them is. ⟲

It’s also hard to undo. A master-detail relationship can only be converted to a lookup when the parent has no roll-up summary fields, and converting it changes the child’s sharing to Public Read/Write (same source). By the time volume tells you it was the wrong choice, the relationship may be holding up reports, sharing and automation. Count the children before you choose the relationship. ⟲

Steve Trucking has one of these decisions in its model. Each Retail Partner sends a Manifest (Manifest__c, a custom object) for each distribution center, for each working day. Manifest is custom, so master-detail to the partner’s account is allowed, and it’s tempting: the manifest would inherit the partner’s sharing, which is exactly the isolation we want. Now count. Our largest partner has nine or more DCs: nine manifests a working day, about 2,700 a year. Past 10,000 in under four years, under one parent, and every manifest revised on the day, so every revision would touch the partner’s account. That’s why the model makes Manifest a lookup and handles partner access through sharing. The invoice stays small; the manifests keep coming. ⟲

Master-detail where the parent stays small Two relationships side by side. On the left, in green, master-detail where the parent stays small: an Invoice (Invoice__c) has Invoice Lines (Invoice_Line__c) on a thick master-detail line, a few lines each. On the right, in amber, a lookup where the children keep coming: a Retail Partner (Account, the largest with nine or more distribution centers) sends Manifests (Manifest__c, one per distribution center a day) on a thin lookup line, about 2,700 a year. Underneath: Salesforce's best practice is no more than 10,000 children for one master-detail parent, and the largest partner passes that in under four years. MASTER-DETAIL: THE PARENT STAYS SMALL LOOKUP: THE CHILDREN KEEP COMING has a few lines each Invoice Invoice__c · stays small Invoice Line Invoice_Line__c Salesforce's best practice: no more than 10,000 children for one master-detail parent. The largest partner passes that in under four years. exactly one zero or one one or many zero or many master-detail lookup © 2026 Twinshark LLC · stevetecharc.com
Büyütmek için tıklayın

Step 1 of 2: master-detail, where the parent stays small. ⟲

Master-detail where the parent stays small Two relationships side by side. On the left, in green, master-detail where the parent stays small: an Invoice (Invoice__c) has Invoice Lines (Invoice_Line__c) on a thick master-detail line, a few lines each. On the right, in amber, a lookup where the children keep coming: a Retail Partner (Account, the largest with nine or more distribution centers) sends Manifests (Manifest__c, one per distribution center a day) on a thin lookup line, about 2,700 a year. Underneath: Salesforce's best practice is no more than 10,000 children for one master-detail parent, and the largest partner passes that in under four years. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.34.0", "built": "2026-10-20", "id": "DGM-DA-LDV-24", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "object-model/physical 1.8.0", "theme": "stevetecharc 1.4.0"} MASTER-DETAIL: THE PARENT STAYS SMALL LOOKUP: THE CHILDREN KEEP COMING has a few lines each sends 2,700 a year Invoice Invoice__c · stays small Invoice Line Invoice_Line__c Retail Partner Account · largest has 9+ DCs Manifest Manifest__c · one per DC a day Salesforce's best practice: no more than 10,000 children for one master-detail parent. The largest partner passes that in under four years. exactly one zero or one one or many zero or many master-detail lookup © 2026 Twinshark LLC · stevetecharc.com
Büyütmek için tıklayın

Step 2 of 2: a lookup, where the children keep coming. ⟲

Watch Account with its contacts and opportunities too. It isn’t master-detail, but it behaves like a pseudo master-detail, with implicit sharing to the parent, which is why the 10,000 guidance shows up there as well. None of this means never use master-detail at scale. It means don’t choose a strongly coupled relationship and then act surprised that the records are strongly coupled. ⟲

Test knowledge. Know the 10,000-children guidance for master-detail, and what master-detail brings with it at volume: no owner on the detail (access controlled by the parent), cascade delete, no reparenting unless allowed, roll-up summaries, and parent locking when children are saved. Converting to a lookup needs no roll-up summaries on the master. ⟲

Now the owner. I ask the room: who owns a million records? The admin? Is the admin sitting there creating a million records? Usually it’s the integration user or the data load user. The records come in, and nobody knows who to give them to. We create an integration user, it creates records, nobody thinks about ownership (“it’s just the integration user”), and a year later that user owns 2 million records. Salesforce calls it ownership data skew when one user owns more than 10,000 records of an object, and the classic example is all the unassigned leads parked on a dummy user (Ownership Data Skew (yeni sekmede açılır)). That doesn’t mean a user can never own more. It means understanding the consequences: ownership isn’t a Created By stamp. It drives the role hierarchy, sharing rules and recalculation: behind the scenes, Salesforce keeps share records for the owner’s records above them in the role hierarchy. Attach millions of records to one owner who sits deep in the sharing model, and changing anything about that owner gets expensive. ⟲

The guidance matches what I teach in class. If a few users must own a very large number of records, give them no role; if they need one, put them in a separate role at the top of the hierarchy and don’t move them, and keep them out of public groups used as sources for sharing rules (same source). One catch with the top role: that user inherits access to all the data owned by or shared with the users below them. You could spread the records across a bunch of users instead, but for an integration user or a data load user, that typically isn’t worth the trouble. ⟲

We’re isolating the hot spot from the structures that trigger recalculation. Imagine a user who owns 5 million records being moved in a reorganization. That isn’t moving a box on the org chart; Salesforce may have to re-evaluate access across 5 million records. At this scale, organizational changes become data operations. ⟲

Test knowledge. Know the skew thresholds and the fixes: ownership skew when one user owns more than 10,000 records of an object (no role, or a separate role at the top that doesn’t move, and out of public groups used by sharing rules); parent-child skew at about 10,000 children under one parent. ⟲

Makinenin Oluşturduğu Kayıtların Sahibi Kim Olmalı?

Bölüm başlığı “Makinenin Oluşturduğu Kayıtların Sahibi Kim Olmalı? ”

Bir kaydı kimin oluşturduğu ile kimin sahibi olduğu aynı soru değildir. Redrock API üzerinden 500.000 teslimat gönderir ve bunları entegrasyon kullanıcısı oluşturur. Sonsuza kadar onların sahibi o mu olmalı? Belki, ama yalnızca onları oluşturduğu için değil. Ve artık ajanlar da kayıt oluşturuyor.

Görüşüm: sahipliğin paylaşım için önemli olup olmadığına bağlıdır. Entegrasyon veya ajan kullanıcısı geçerli bir kullanıcıdır ve kayıtlara sahip olabilir. O nesnede sahiplik erişimi yönlendiriyorsa (rol hiyerarşisi veya paylaşım kuralları aracılığıyla), kayıtları işin gerektirdiği sahibe atayın: gerçek bir kullanıcıya, nesne destekliyorsa bir kuyruğa ya da özel bir sahip kullanıcıya. Sahiplik erişimi yönlendirmiyorsa, ajanı veya entegrasyon kullanıcısını sahip olarak tutmak daha iyi bir seçim olabilir, çünkü denetim izi doğrudan kaydı oluşturan şeye götürür. Her iki durumda da, insanlar genellikle kayıtların sahibi olduğu için makinenin oluşturduğu her kaydı mekanik olarak yeniden atamak yerine, Sahip’in bu nesne için ne anlama geldiğine karar verin. Ve Oluşturan’ın hâlâ orada olduğunu unutmayın: sahipliği yeniden atamak, kaydı entegrasyonun oluşturduğu bilgisini kaybettirmez. Oluşturan ve Sahip farklı soruları yanıtlar. Tek bir alana ikisini birden yanıtlatmak kötü bir model elde etmenin yoludur.

A lookup can be a hot spot too: millions of records pointing at the same location, category, reference record or configuration record. Salesforce’s own training defines it: “Lookup skew happens when a very large number of records are associated with a single record in the lookup object” (Large Data Volumes: Design Your Data Model (yeni sekmede açılır)). The danger isn’t “lots of lookups.” It’s concentration combined with activity: if millions of active records reference one record, and transactions keep touching that relationship, operations start colliding over it. That’s record locking, which chapter 11 covers. For now, recognize the shape: many active records, one heavily referenced record, worth inspecting. ⟲

Her Çarpıklık Aynı Derecede Tehlikeli Değildir

Bölüm başlığı “Her Çarpıklık Aynı Derecede Tehlikeli Değildir ”

“10.000 = kötü” diye ezberlemeyin. Asla değişmeyen bir referans değerine işaret eden, paylaşımda rolü olmayan ve neredeyse hiç eşzamanlı etkinliği olmayan elli bin tarihsel kayıt sorun olmayabilir. Sık değişen, paylaşımı yönlendiren, toplamaları besleyen ve aynı anda birkaç entegrasyonun dokunduğu bir üst kaydın altındaki yirmi bin aktif kayıt çok farklı bir hikâyedir. Hacmin bir biçimi vardır, çarpıklığın da. Orada kaç kayıt birleşiyor? Ne sıklıkla değişiyorlar? Üst kayıt değişiyor mu? İlişki paylaşımı veya kilitlemeyi yönlendiriyor mu? Entegrasyonlar alt kayıtları eşzamanlı güncelliyor mu? Sahibi veya üst kaydı taşımak yeniden hesaplamayı tetikliyor mu? Sayı bana nereye bakacağımı söyler; davranış ne kadar endişelenmem gerektiğini söyler.

Beş yılda yaklaşık 9 milyon iş emri öngördük. Diyelim ki biri “Her teslimatın sahibi entegrasyon kullanıcısı olsun” diyor. Dokuz milyon kayıt, tek sahip. Teslimatların paylaşımı için sahiplik önemli mi? Değilse, özel bir yüksek hacimli sahip, yukarıda anlatıldığı gibi rol hiyerarşisinden ve paylaşım kuralı gruplarından yalıtılarak işe yarayabilir. Önemliyse, tek bir entegrasyon sahibi yanlış iş modelidir: kaydı entegrasyon oluşturur; bu onun sahibi olması gerektiği anlamına gelmez.

Then the Retail Partner. Every work order carries its partner, deliberately, because partner isolation matters. But if one partner is 40% of the business, five years of deliveries is about 3.6 million work orders under one partner account. Does that make the relationship wrong? No. The business relationship is real, and I’m not going to invent 400 fake Redrock accounts because I don’t like the count. But I am going to look for a split the business would recognize. Each partner has real distribution centers, so a child account per DC under the partner spreads the work orders nine or more ways while every account still means something. Add archiving completed deliveries after the claims window, and the active children per parent stay low. ⟲

İki düzeltme arasındaki fark bu. “Unassigned Contacts” zaten yapaydı, bu yüzden onu bir havuza bölmek hiçbir anlam kaybettirmez. Redrock gerçek bir ortaktır; onu Redrock 001, 002 ve 003’e bölmek modeli bozar. Onu gerçek DC’lerine bölmek bozmaz. Ölçek düzeltmeleri yine de anlamı korumalıdır. Bazen yanıt farklı bir ilişki, paylaşım stratejisi, sorgu kalıbı, depolama modeli veya arşiv politikasıdır; ama asla gerçek bir iş varlığı için sahte bir kimlik değildir.

Steve Trucking's hot spots Steve Trucking's hot spots, a slice of the delivery core. Work Order, 9 million in five years, sits in the middle. It points to a child account per DC, the split the business knows, which is a child of the largest Retail Partner, marked amber: 3.6 million work orders, inspect. An integration or agent user, also amber, owns the work orders: owns all 9 million? Inspect. Each work order contains Work Order Line Items, about 1.6 each: no hot spot. Underneath: inspect, not bad; split a real partner by its real DCs, never into fake copies. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.28.0", "built": "2026-10-15", "id": "DGM-DA-LDV-22", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "object-model/conceptual 1.8.0", "theme": "stevetecharc 1.4.0"} child of is for contains owns Largest Retail Partner 3.6 million work orders: inspect A child account per DC the split the business knows Work Order 9 million in five years Work Order Line Item 1.6 per work order: no hot spot Integration or agent user owns all 9 million? inspect Inspect, not bad. Split a real partner by its real DCs, never into fake copies. © 2026 Twinshark LLC · stevetecharc.com
Büyütmek için tıklayın

Inspect, not bad. Concentration matters, not the total. ⟲

Sevdiğim bir alıştırma. Veri modelini alın ve yalnızca nesnelere değil, oklara bakın. Her ilişki için sorun: okun bu tarafında kaç kayıt birikebilir? Sonra aynısını Sahip için sorun. Şimdi üç yıl, beş, on yıl sonrasını düşünün. Kayıtlar nerede yoğunlaşıyor? Yarının sorunu genellikle orada saklanıyordur.

Sınavın ötesinde: yapay zekânın değiştirdikleri. Bir kişi günde 20 kayıt oluşturabilir; bir ajan binlerce. Bir ajana kendi kullanıcısını verin, her kaydın sahibi o kalsın; sahiplik çarpıklığı insanlarla olduğundan çok daha hızlı ortaya çıkar. Ajan sahipliği yanlış değildir, ama hacim varsayılanı mimarinin bir parçası yapmadan önce ajanların oluşturduğu kayıtlar için Sahip’in ne anlama geldiğine karar verin.

  • Üst-alt, sahiplik veya arama ilişkilerinin kayıtları nerede yoğunlaştırdığı ve sıcak nokta olacak kadar aktif olup olmadıkları.
  • Makinenin oluşturduğu kayıtların entegrasyon veya ajan kullanıcısına ait mi kalacağı, yoksa sahiplik erişimi yönlendirdiği için yeniden mi atanacağı.
  • Yüksek hacimli sahiplerin rol hiyerarşisinden ve paylaşım kuralı gruplarından nasıl yalıtıldığı.
  • Yapay bir üst kaydın ne zaman havuzlanabileceği ve gerçek bir ilişkinin ne zaman anlamlı bir bölmeye ihtiyaç duyduğu.
  • Whether each master-detail relationship stays under about 10,000 children per parent at projected volume, or should be a lookup. ⟲

Binlerce sahip ve üst kayda dağılmış bir milyon kayıt, tek bir yere işaret eden bir milyon kayıttan çok farklı davranır. Sıcak noktaları erken arayın: sahipler, üst kayıtlar, aramalar, Sıfır Sayısı’nın birleştiği her yer. Amaç her büyük ilişkiyi ortadan kaldırmak değil; bazıları işi doğru temsil eder. Amaç, otoyolu açmadan önce trafiğin nereye gittiğini bilmektir, çünkü milyonlarca kayıt aynı çıkışa yöneldiğinde yolu değiştirmek çok daha zordur.