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

إصدارات الصفوف واللقطات

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

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

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

في هذا الدرس

explain visibility using xmin, xmax, and snapshots.

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

  • Every row version (tuple) stores xmin (transaction that created it) and xmax (transaction that deleted or replaced it).
  • A snapshot lists which transactions are committed from the viewpoint of a statement or transaction.
  • A version is visible if its creator is committed in your snapshot and its deleter is not.
  • Under READ COMMITTED a snapshot is taken per statement; under REPEATABLE READ once per transaction.
تفاصيل المخطط المبدئي

عرض عملي

sql
SELECT xmin, xmax, ctid, * FROM product WHERE id = 1;

Run before and after an update in another session; point at the changed xmin and ctid.

اختبر فهمك

What does xmax hold on a live row that nobody has touched?

أظهر الإجابة

Zero; no deleting transaction.

التطبيق

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

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

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

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