Skip to content
DbaFix
Just share answer and question for fixing database problem
MENU
  • HOME

Tag: recursive

How to get all connected values as a single column

By adminPosted on March 17, 2023

Question : I’m trying to use CTE recursion. This is my scenario SQL Fiddle. It is a simple tree structure: […]

Can EXPLAIN be used to get some insights about Common Table Expression (CTE)?

By adminPosted on March 10, 2023

Question : I need to find the ancestors in a table having an ID value and a Google research point […]

SQL recursion and cte – dates timeseries

By adminPosted on February 15, 2023

Question : I need to build vector(s) of time series dates (say 10) for a subset of start dates. The […]

Social network comments and posts model in PostgreSQL 9.6

By adminPosted on February 10, 2023

Question : I’m trying to figure out a data structure for migrating from MongoDB to PostgreSQL. Within my posts table […]

CTE: Get all parents and all children in one statement

By adminPosted on February 3, 2023

Question : I have this working CTE example. I can select all grand-parents and all children. But how can I […]

postgresql Recursive Update resulting in Sequential Scan

By adminPosted on January 30, 2023

Question : I have a table with a self-referential foreign key, and I would like to update a given parent, […]

Finding earliest connected value over two columns

By adminPosted on January 22, 2023

Question : I have a, perhaps slightly esoteric, use case. Given a table like the following: id1 | id2 | […]

Recursive Parent-Child Location Relationship Cache as View

By adminPosted on January 11, 2023

Question : Here is my data structure: CREATE TABLE Locations( LocID int IDENTITY(1,1) NOT NULL, LocationTypeID int NOT NULL, ParentID […]

How to use a recursive CTE to get ancestors in a hierarchy

By adminPosted on January 10, 2023

Question : create table division ( id serial primary key, name varchar not null ); — nested sets table create […]

Grouping by overlapping arrays, transitively, without duplicates

By adminPosted on December 27, 2022

Question : I’ve found: Group by array overlapping https://stackoverflow.com/a/23650080/5419599 However, I’m having trouble putting it to use in my case. […]

  • 1
  • 2
  • 3
  • …
  • 12

Recent Posts

  • Modelling a database for a travelling business that involves Vehicules, Routes, Subroutes and Prices
  • Hard Drive Configuration for my setup
  • Optimize delete query in SQL Server 2008 R2 SP1
  • Join query with closest date in “ON” clause
  • Postgresql vs MySQL – Which is better for join queries & writing data(inserts) [closed]
  • Subtracting an integer in my db by 1. SQL
  • MariaDB Galera Arbitrator failing to sync with SSL
  • Array exceed allowed size in Postgres
  • Mysql Server 5.6 high memory consumption
  • SQL Server 2016 Always ON high availability group listener configuration
  • Columns count in SELECT query and SQL Server buffer cache
  • Postgres sharding installation with citusdb
  • T-SQL Query to calculate Settele and withdraw amount in MSSQL- SERVER
  • Case when not return more than one value
  • Creating a constraint
  • Which of the following pieces of SQL is most efficient
  • Using Oracle hierarchical queries for transposing field value into rows
  • Updating an FTS indexed column returns “Invalid InnoDB FTS Doc ID”
  • Migrating 300 GB mysql database from one server to another cleanly with minimum downtime
  • how to join one select statement to another pivot select statement [closed]

Categories

  • Database Backup
  • Database Design
  • Database Index
  • Database Optimization
  • InnoDB
  • Join
  • MariaDB
  • MongoDB
  • MySQL
  • Oracle
  • Performance
  • Permissions
  • Postgresql
  • Query Performance
  • Replication
  • Security
  • SQL Server
Proudly powered by WordPress / Support by: DizzyCoding