Blog
Mert Özen'in yazılım geliştirme, backend, frontend ve DevOps üzerine blog yazıları.
PostgreSQL'de JSONB: Operator'ler, SQL/JSON Function'ları, GIN Index ve Ne Zaman Kullanmamalı?
JSONB, JSON'ı yazarken bir kez ayrıştırıp binary yapıda saklar; disk kazandırmaz ama @>, ? ve jsonpath ile sorgulanabilir ve GIN ile index'lenebilir. Bookstore'un books.attributes kolonu üzerinde json/jsonb farkı, operator'ler, jsonb_set, 17'nin JSON_VALUE ve JSON_TABLE'ı, jsonb_ops ile jsonb_path_ops'un hangi sorguda index kullandığı, expression index, tek sayaç için 175 kB WAL üreten TOAST tuzağı, tahmin hataları ve EAV'nin JSON hâli.
PostgreSQL Full-Text Search: tsvector, tsquery, Türkçe Configuration, unaccent ve pg_trgm
PostgreSQL'de Türkçe arama için turkish configuration yeterli bir başlangıç ama stemmer'ı kusursuz değil: "kasabalar" bulunurken "kasaba" bulunamayabilir; prefix araması, unaccent ve pg_trgm bu boşlukları kapatır. tsvector/tsquery, websearch_to_tsquery, 18'de full-text'in collation provider'ı kullanması ve İ/ı, setweight'li STORED generated column ve GIN, ts_rank, ts_headline, typo toleransı ve Elasticsearch'e ne zaman geçileceği.