МШ
Именно в (pg_dump/psql)
Size: a a a
МШ
DP
NR
"Total Cost": 461705.93,
"Plan Rows": 166893,
"Shared Hit Blocks": 6286,
"Shared Read Blocks": 453751,
"Total Cost": 38801.21,
"Plan Rows": 742621,
"Shared Hit Blocks": 31375,
"Shared Read Blocks": 0,
YS
"Total Cost": 461705.93,
"Plan Rows": 166893,
"Shared Hit Blocks": 6286,
"Shared Read Blocks": 453751,
"Total Cost": 38801.21,
"Plan Rows": 742621,
"Shared Hit Blocks": 31375,
"Shared Read Blocks": 0,
\d+ таблица
E
NR
\d+ таблица
Table "public.table"
Column | Type | Modifiers | Storage | Stats target | Description
------------------+-----------+---------------------------------------------------------+----------+--------------+-------------
id | bigint | not null default nextval('table_id_seq'::regclass) | plain | |
c1 | integer[] | | extended | |
c2 | integer | | plain | |
c3 | bigint | | plain | |
c4 | bigint | | plain | |
c5 | bigint | | plain | |
c6 | bigint | | plain | |
c7 | integer | | plain | |
c8 | integer | | plain | |
c9 | boolean | | plain | |
c10 | boolean | | plain | |
c11_id | integer | | plain | |
c12_id | bigint | | plain | |
c13_id | bigint | | plain | |
c14 | boolean | | plain | |
Indexes:
"table_pkey" PRIMARY KEY, btree (id)
"c3c4_idx" btree (c3, c4)
[
{
"Plan": {
"Node Type": "Seq Scan",
"Parallel Aware": false,
"Relation Name": "table",
"Schema": "public",
"Alias": "table",
"Startup Cost": 0,
"Total Cost": 461705.93,
"Plan Rows": 166893,
"Plan Width": 100,
"Actual Startup Time": 40306.758,
"Actual Total Time": 43905.994,
"Actual Rows": 168103,
"Actual Loops": 1,
"Output": [
"id",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
"c7",
"c8",
"c9",
"c10",
"c11_id",
"c12_id",
"c13_id",
"c14"
],
"Shared Hit Blocks": 5566,
"Shared Read Blocks": 454471,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.055,
"Triggers": [],
"Execution Time": 43914.751
}
]
YS
Table "public.table"
Column | Type | Modifiers | Storage | Stats target | Description
------------------+-----------+---------------------------------------------------------+----------+--------------+-------------
id | bigint | not null default nextval('table_id_seq'::regclass) | plain | |
c1 | integer[] | | extended | |
c2 | integer | | plain | |
c3 | bigint | | plain | |
c4 | bigint | | plain | |
c5 | bigint | | plain | |
c6 | bigint | | plain | |
c7 | integer | | plain | |
c8 | integer | | plain | |
c9 | boolean | | plain | |
c10 | boolean | | plain | |
c11_id | integer | | plain | |
c12_id | bigint | | plain | |
c13_id | bigint | | plain | |
c14 | boolean | | plain | |
Indexes:
"table_pkey" PRIMARY KEY, btree (id)
"c3c4_idx" btree (c3, c4)
[
{
"Plan": {
"Node Type": "Seq Scan",
"Parallel Aware": false,
"Relation Name": "table",
"Schema": "public",
"Alias": "table",
"Startup Cost": 0,
"Total Cost": 461705.93,
"Plan Rows": 166893,
"Plan Width": 100,
"Actual Startup Time": 40306.758,
"Actual Total Time": 43905.994,
"Actual Rows": 168103,
"Actual Loops": 1,
"Output": [
"id",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
"c7",
"c8",
"c9",
"c10",
"c11_id",
"c12_id",
"c13_id",
"c14"
],
"Shared Hit Blocks": 5566,
"Shared Read Blocks": 454471,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.055,
"Triggers": [],
"Execution Time": 43914.751
}
]
NR
"Seq Scan on table (cost=0.00..461705.93 rows=166893 width=100) (actual time=40245.945..43832.027 rows=168103 loops=1)"
" Buffers: shared hit=5662 read=454375"
"Planning time: 0.086 ms"
"Execution time: 43840.624 ms"
"Seq Scan on table_fast (cost=0.00..38801.21 rows=742621 width=1711) (actual time=0.037..393.563 rows=846456 loops=1)"
" Buffers: shared hit=31375"
"Planning time: 0.063 ms"
"Execution time: 437.492 ms"
Table "public.table_fast"
Column | Type | Modifiers | Storage | Stats target | Description
-------------+------------------------+----------------------------------------------------+----------+--------------+-------------
id | bigint | not null default nextval('table_fast_id_seq'::regclass) | plain | |
t1 | text | | extended | |
t2 | boolean | | plain | |
t3 | boolean | | plain | |
t4 | integer | | plain | |
t5 | character varying(255) | | extended | |
t6 | bigint | | plain | |
t7 | bigint | | plain | |
t8 | character varying(255) | | extended | |
t9 | character varying(255) | | extended | |
t10 | character varying(255) | | extended | |
t11 | date | | plain | |
Indexes:
"table_fast_pkey" PRIMARY KEY, btree (id)
"table_fast_t7" btree (t7, t2)
"table_fast_index" btree (t6, t3)
Foreign-key constraints:
"table_fast_t7_fkey" FOREIGN KEY (t7) REFERENCES b(id) ON UPDATE CASCADE ON DELETE SET NULL
"table_fast_t6_fkey" FOREIGN KEY (t6) REFERENCES l(id) ON UPDATE CASCADE ON DELETE SET NULL
YS
"Seq Scan on table (cost=0.00..461705.93 rows=166893 width=100) (actual time=40245.945..43832.027 rows=168103 loops=1)"
" Buffers: shared hit=5662 read=454375"
"Planning time: 0.086 ms"
"Execution time: 43840.624 ms"
"Seq Scan on table_fast (cost=0.00..38801.21 rows=742621 width=1711) (actual time=0.037..393.563 rows=846456 loops=1)"
" Buffers: shared hit=31375"
"Planning time: 0.063 ms"
"Execution time: 437.492 ms"
Table "public.table_fast"
Column | Type | Modifiers | Storage | Stats target | Description
-------------+------------------------+----------------------------------------------------+----------+--------------+-------------
id | bigint | not null default nextval('table_fast_id_seq'::regclass) | plain | |
t1 | text | | extended | |
t2 | boolean | | plain | |
t3 | boolean | | plain | |
t4 | integer | | plain | |
t5 | character varying(255) | | extended | |
t6 | bigint | | plain | |
t7 | bigint | | plain | |
t8 | character varying(255) | | extended | |
t9 | character varying(255) | | extended | |
t10 | character varying(255) | | extended | |
t11 | date | | plain | |
Indexes:
"table_fast_pkey" PRIMARY KEY, btree (id)
"table_fast_t7" btree (t7, t2)
"table_fast_index" btree (t6, t3)
Foreign-key constraints:
"table_fast_t7_fkey" FOREIGN KEY (t7) REFERENCES b(id) ON UPDATE CASCADE ON DELETE SET NULL
"table_fast_t6_fkey" FOREIGN KEY (t6) REFERENCES l(id) ON UPDATE CASCADE ON DELETE SET NULL
DK
M
M
К
M
NR
70570092 {2} 1 1399472 1754582 67640 67640 21 26 true 60000349 true
- такие данные могут занять 3.5 гига. Случайно нет каких-то особенностей с удалением из таблицы? Что данные продолжают занимать местоYS
70570092 {2} 1 1399472 1754582 67640 67640 21 26 true 60000349 true
- такие данные могут занять 3.5 гига. Случайно нет каких-то особенностей с удалением из таблицы? Что данные продолжают занимать местоВЯ
ВЯ
YS
ВЯ