COSCUP 2026 開源人年會

From JOINs to Graph Thinking: Practical SQL/PGQ in PostgreSQL
2026年8月8日 , RB102

Description

Modern data is highly connected — such as supply chains, networks, and relationships.

PostgreSQL is strong for relational queries, but when we need to follow multi-step connections, queries quickly become complex. JOINs grow, and the SQL becomes harder to read, maintain, and extend.

SQL/PGQ (SQL:2023) brings graph query capabilities into SQL. It allows us to describe connections and paths more directly, without leaving PostgreSQL.

SQL/PGQ is currently under development in PostgreSQL, and early implementations are already available for experimentation.

In this talk, I show how queries evolve from simple joins to multi-step paths. We compare traditional SQL and SQL/PGQ, focusing on readability and how we think about the problem.

Using a small trade network example, I demonstrate how SQL/PGQ can simplify queries and help us better understand connected data.

Outline

  • Problem: complex JOIN queries
  • SQL/PGQ basics (SQL:2023)
  • SQL vs SQL/PGQ examples
  • Graph thinking in PostgreSQL
  • Current status and how to try it

Key Takeaways

  • JOINs become complex for multi-step queries
  • SQL/PGQ simplifies relationship queries
  • Graph thinking improves understanding of data
  • SQL becomes more powerful, not replaced

難易度: 中階

Koji Annoura is a Knowledge Graph architect and open-source community leader based in Japan.

He has been active in open-source communities for over 20 years, organizing developer meetups and user groups such as the Neo4j Users Group Tokyo and the Apache Hop User Group Japan.

His work focuses on graph technologies, knowledge design, SQL/PGQ, GQL, and Context Graphs for connecting knowledge, evidence, decisions, and time.

He regularly speaks at international conferences and shares reproducible, hands-on approaches for building knowledge graphs, traceable knowledge systems, GraphRAG systems, and open knowledge workflows.

此講者還出現在: