EFCore

Pinned ·

SQL Optimistic Lock in .Net

@Georg Bommeli

Once again, I've encountered a concurrency issue recently. The data I attempted to modify didn't yield the desired results. There's evidence showing that more than two applications accessed this data simultaneously. Identifying the application exhibiting conflicting behavior is really difficult. Optimistic locking is a solution for this issue.

Pinned ·

Large Jsonb Value Performance in Postgres

@James Hammond

Introduction

Recently, our team encountered some performance issues with our APIs. Typically, such issues arise from inefficient querying strategies. However, we stumbled upon a particularly interesting case. This specific API was solely responsible for update operations.In this post, we'll share our experience with this unique case and delve into the JSONB performance during update actions within PostgreSQL.

Pinned ·

如何在EFCore中使用Posrgres的Jsonb(2)

@Alex Shuper

雖然在設計階段應該避免讓Jsonb的資料成為查詢條件,但開發的時候仍然難以避免這樣的需求。Postgres針對Jsonb的查詢提供了不少高效的API,如果想要搭配EFCore使用就會需要預先定義型別或者搭配JsonDocument使用。

Pinned ·

如何在EFCore中使用Posrgres的Jsonb(1)

@Alex Shuper

Postgres中有一個特殊的Jsonb型別,可以用來存放Json格式的資料,資料庫會對Json的節點做一定的整理。使用這個型別能夠在關聯式資料庫嚴格的限制下取得一定的彈性,讓我們在享有SQL的保證時同時享受NoSQL的彈性。然而針對EFCore這種對資料庫抽象化的ORM框架來說,Jsonb的查詢與寫入屬於Postgres的特化功能,需要靠額外的方式來達到支援。因為最近專案中又使用到Jsonb來保存部份資料,重新看一次文件後稍微調整了一下這次的作法。