Data & Database
Elasticsearch Query DSL Syntax Notes
A compilation of common Elasticsearch Query DSL syntax. Compared to Query String, DSL supports Nested queries, Geo queries, and Function Score for custom scoring, making it ideal for building complex and precise search logic.
Considerations for Elasticsearch Dynamic Field Mapping
A reminder to avoid over-reliance on Elasticsearch Dynamic Mapping in production environments. This article analyzes the storage waste (text + keyword) and Mapping Explosion issues caused by automatic mapping, and recommends explicitly defining your Schema.
Elasticsearch QueryString Query Syntax Notes
An introduction to the Elasticsearch `query_string` syntax. Explains how to use simple string conditions (such as AND, OR, and wildcards) for full-text search, suitable for quick query scenarios in Elasticvue or Kibana Discover.
A Brief Introduction to SQL Server Transaction Logs
An analysis of the operating mechanism of SQL Server transaction logs (.ldf). This article introduces the differences between Full, Bulk-Logged, and Simple recovery models, as well as the importance of transaction log truncation and backups.
Unique Constraint VS Unique Index
Comparing the similarities and differences between Unique Constraint and Unique Index in SQL Server. Both are similar in terms of data uniqueness and query performance, and creating a Unique Constraint automatically creates a Unique Index. The main differences lie in semantics and Foreign Key association restrictions.
A Brief Discussion on NULL Comparisons in SQL Server WHERE Clauses
Exploring the comparison logic of `NULL` in SQL. Emphasizing that `IS NULL` must be used instead of `= NULL` in `WHERE` clauses, and explaining how `UNKNOWN` logical results affect queries.
Customizing Display Columns in SQL Server Management Studio Table Designer
Solve the issue of insufficient default columns in the SSMS table designer interface. Learn how to customize advanced columns like Description, Identity, and Default Value by modifying the Windows Registry.
Setting Table Descriptions Using SQL Server Management Studio
Explains how to set table descriptions in SSMS to support DB schema documentation. Covers both the SSMS UI 'Extended Properties' method and using the `sp_addextendedproperty` stored procedure.
A Brief Discussion on Handling Database String Types
Comparing three strategies for handling NULL and empty strings in database string columns. Analyzing their pros and cons, and discussing factors such as Oracle's automatic NULL conversion and index performance.
SQL Server Performance Tuning
An introduction to using the SSMS 'Execution Plan' tool to analyze SQL query performance. This article compares 'Actual Execution Plan' and 'Estimated Execution Plan,' and explains how to identify and optimize missing indexes.
