انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-012-L03

GIN وGiST وBRIN وhash

  • الدرس 3 من 6
  • Mid-level
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

pick the right index type for a workload.

الموضوعات المخطط لها

  • GIN: many keys per row; jsonb, arrays, full-text search. Slower writes, fast containment lookups.
  • GiST: geometric and range types, nearest-neighbour, exclusion constraints.
  • BRIN: tiny index of min/max per block range; good for huge, naturally ordered tables (append-only created_at).
  • Hash: equality only; B-tree is usually just as good.
  • Default to B-tree; use the others when the operator demands it.
تفاصيل المخطط المبدئي

عرض عملي

a table of workload to index type, with CREATE INDEX ... USING gin (attrs jsonb_path_ops) and USING brin (created_at).

اختبر فهمك

Which type suits a 10 M-row append-only table filtered by date range with minimal space?

أظهر الإجابة

BRIN.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.