# Predicate

Published articles for Predicate.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Soft deletes affect database constraints, indexes, and application queries

DevFeed: [Soft deletes affect database constraints, indexes, and application queries](<https://devfeed.tech/articles/soft-deletes-are-a-schema-decision-that-breaks-every-query-you-write-afterwards-39592.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/40-soft-deletes-schema-decision/>)

Author: hello@ankit-rana.com

Published: 2026-08-20T00:00:00Z

Content type: opinion

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [data-processing](<https://devfeed.tech/topics/data-processing.md>), [Database](<https://devfeed.tech/topics/database.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>)

Tags: [data-modelling](<https://devfeed.tech/tags/data-modelling.md>), [database-design](<https://devfeed.tech/tags/database-design.md>), [foreign-keys](<https://devfeed.tech/tags/foreign-keys.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [orm](<https://devfeed.tech/tags/orm.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [schema](<https://devfeed.tech/tags/schema.md>), [schema-design](<https://devfeed.tech/tags/schema-design.md>), [soft-delete](<https://devfeed.tech/tags/soft-delete.md>)

### AI overview

The article explains how soft deletion affects database design beyond adding a deleted_at column. It discusses duplicate-key failures, foreign-key behavior, queries that may return deleted rows, and index inefficiency, noting that PostgreSQL partial indexes help while MySQL requires a workaround.

### Source excerpt

A deleted_at column turns every future query into a conditional one, and the cost is not the extra predicate. Unique constraints stop working because the deleted row still occupies the key, foreign keys start pointing at rows the application considers gone, and any query written by someone who does not know about the column silently returns deleted data. Soft delete is a data lifecycle decision, and treating it as a boolean column is what makes it expensive.

## Why your index is not being used, and why the planner is usually right

DevFeed: [Why your index is not being used, and why the planner is usually right](<https://devfeed.tech/articles/why-your-index-is-not-being-used-and-why-the-planner-is-usually-right-39590.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/38-why-your-index-is-not-being-used/>)

Author: hello@ankit-rana.com

Published: 2026-08-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [bug](<https://devfeed.tech/topics/bug.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [cardinality](<https://devfeed.tech/tags/cardinality.md>), [database-performance](<https://devfeed.tech/tags/database-performance.md>), [explain](<https://devfeed.tech/tags/explain.md>), [function](<https://devfeed.tech/tags/function.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [query](<https://devfeed.tech/tags/query.md>), [query-planner](<https://devfeed.tech/tags/query-planner.md>)

### AI overview

This tutorial explains why database indexes may not be used even when they exist. It focuses on inaccurate cardinality estimates caused by stale statistics, predicates that prevent index matching, implicit casts, and cases where sequential scans are the cheaper choice.

### Source excerpt

An unused index is almost never a planner bug. It is usually a predicate the planner cannot match to the index, such as a function or an implicit cast applied to the column, or a cardinality estimate that is wrong because statistics are stale. When the estimate is right and the planner still refuses, it is often correct: past a few percent of the table, random access through an index costs more than reading the table sequentially. The diagnostic that matters is the gap between estimated and actual rows in EXPLAIN ANALYZE.

## A Condition is a Field

DevFeed: [A Condition is a Field](<https://devfeed.tech/articles/a-condition-is-a-field-28929.md>)

Original publisher: [Read original article](<https://blog.jooq.org/a-condition-is-a-field/>)

Author: lukaseder

Published: 2022-08-24T09:09:11Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [boolean](<https://devfeed.tech/tags/boolean.md>), [boolean-type](<https://devfeed.tech/tags/boolean-type.md>), [condition](<https://devfeed.tech/tags/condition.md>), [data-type](<https://devfeed.tech/tags/data-type.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-17](<https://devfeed.tech/tags/jooq-3-17.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [logic](<https://devfeed.tech/tags/logic.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [sql](<https://devfeed.tech/tags/sql.md>), [three-valued-logic](<https://devfeed.tech/tags/three-valued-logic.md>)

### AI overview

The article explains that, starting with jOOQ 3.17, the Condition type extends Field<Boolean>, allowing conditions to be projected directly and used wherever boolean value expressions are accepted. It describes compatibility differences between PostgreSQL and Oracle and jOOQ's emulation of the feature while preserving three-valued logic.

### Source excerpt

Starting with jOOQ 3.17, the Condition type extends the Field<Boolean> type. Because, that's what the SQL standard thinks it is, in sorts: The exact definition contains intermediate rules, but you get the idea. A <predicate> (which is a Condition in jOOQ) can be used wherever a <boolean value expression> can be used, which again can ... Continue reading A Condition is a Field ->

## How to Filter a SQL Nested Collection by a Value

DevFeed: [How to Filter a SQL Nested Collection by a Value](<https://devfeed.tech/articles/how-to-filter-a-sql-nested-collection-by-a-value-28940.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-filter-a-sql-nested-collection-by-a-value/>)

Author: lukaseder

Published: 2022-06-10T14:32:38Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Stack Overflow](<https://devfeed.tech/topics/stackoverflow.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [array-agg](<https://devfeed.tech/tags/array-agg.md>), [derived-table](<https://devfeed.tech/tags/derived-table.md>), [filter](<https://devfeed.tech/tags/filter.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [multiset](<https://devfeed.tech/tags/multiset.md>), [multiset-agg](<https://devfeed.tech/tags/multiset-agg.md>), [nested-collections](<https://devfeed.tech/tags/nested-collections.md>), [order-of-operations](<https://devfeed.tech/tags/order-of-operations.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This tutorial explains how to filter SQL nested collections by a value. It compares filtering arrays through a derived table with using PostgreSQL's ARRAY_AGG and group filtering, then shows a jOOQ version intended to work across supported relational database systems.

### Source excerpt

I stumbled upon a very interesting question on Stack Overflow about how to use jOOQ's MULTISET operator to nest a collection, and then filter the result by whether that nested collection contains a value. The question is jOOQ specific, but imagine, you have a query that nests collections using JSON in PostgreSQL. Assuming, as always, ... Continue reading How to Filter a SQL Nested Collection by a Value ->

## Theorem Proving in Mathematics

DevFeed: [Theorem Proving in Mathematics](<https://devfeed.tech/articles/theorem-proving-in-mathematics-40755.md>)

Original publisher: [Read original article](<https://radek.io/posts/theorem-proving-in-mathematics/>)

Published: 2011-10-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [math](<https://devfeed.tech/topics/math.md>)

Tags: [induction](<https://devfeed.tech/tags/induction.md>), [logic](<https://devfeed.tech/tags/logic.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [sequence](<https://devfeed.tech/tags/sequence.md>), [statement](<https://devfeed.tech/tags/statement.md>)

### AI overview

This tutorial introduces mathematical proof as deductive reasoning from axioms and previously established theorems. It explains direct proof with a worked equation example and begins discussing proof by mathematical induction and its connection to predicate logic.

### Source excerpt

The most common methods of proving you're explained