Solving the knapsack problem with recursive queries and PostgreSQL
summary
Shows how to express and solve the knapsack optimization problem using PostgreSQL recursive (WITH RECURSIVE) queries. Covers defining the problem in SQL, building self-recursing queries, performance risks and safeguards, and demonstrates two PostgreSQL 14 features that simplify handling recursive statements.
AI-written summary · about
related talks
41mSolving the knapsack problem with recursive queries and PostgreSQL
46mSQL for Nerds
47mLearning advanced SQL the weird (and hard) way
51mPostgreSQL: Practical Examples of SQL Query Optimization
45mSELECT 'amazing_features' FROM "postgresql"
48mTricky SQL: Special Features of PostgreSQL's SQL Dialect
33mPostgres, the Best Tool You're Already Using
25mUnderstanding & Managing Postgres Table Bloat