Database.Middle.do i see different tables in some sql explorer like dataGrip, for example ?

🔍 In DataGrip (or pgAdmin, MySQL Workbench, etc.)

When you’re using partitioning, you typically see:

  • The main table (logical parent)
  • Its child tables (actual partitions)

Example (PostgreSQL):

In your table list, you’ll see:

📁 Tables
   ├── sales          -- 👈 Parent table
   ├── sales_2023_q1  -- 👶 Partition
   ├── sales_2023_q2  -- 👶 Partition
  • You query the parent table (sales)
  • The data is stored in the partition tables (sales_2023_q1, etc.)
  • Each partition can be opened individually, showing its subset of data

🧠 What’s Actually Happening

  • The parent table is empty by itself (in most partitioning implementations)
  • When you SELECT * FROM sales, the DB internally runs:
SELECT * FROM sales_2023_q1
UNION ALL
SELECT * FROM sales_2023_q2
...

If partition pruning applies, only the relevant partition(s) are queried.

🧰 Database-Specific Behavior

DatabasePartition Table Appearance in Tools
PostgreSQLShows parent + child tables (visible)
MySQL (InnoDB)Shows only 1 logical table (partitions hidden)
OraclePartitions may not show as separate tables
SQL ServerPartitioning done via partition schemes (not separate tables)

✅ Summary

What You See in DataGripNotes
Parent tableThe table you query directly
Child/partition tables (PostgreSQL)Can be viewed, queried directly
One unified table (MySQL)Partitioning happens under the hood
This entry was posted in Без рубрики. Bookmark the permalink.

Leave a Reply

Your email address will not be published.