add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
version
PostgreSQL 12.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit
5 rows affected
manager_id manager_name
1 N'Ketchi Obaya
2 Sean C4itizen
3 Joe Sixpack
4 Joan Doe
5 Oisín O'Shea
setval
999
4 rows affected
deal_id deal_name
1000 Bitcoin 1
1001 Bitcoin 2
1002 Ethereum 1
1003 Ethereum 2
m_dt man_id d_id m_type m_dt ins_amount p_tot_prev p_tot ?column?
null 1 1000 D 2021-05-06 14:04:18 111111111 0 0 111111111
1 rows affected
p_id mid d_id typ m_dt amount t_prev d_tot t_t
1 1 1000 D 2021-05-06 14:04:18 33 0 33 33
man_id d_id m_type m_dt ins_amount p_tot_prev p_tot ?column?
1 1000 D 2021-05-06 14:04:17.877629+01 1111111 0 33 1111144
1 rows affected
p_id mid d_id typ m_dt amount t_prev d_tot t_t
1 1 1000 D 2021-05-06 14:04:18 33 0 33 33
2 1 1000 C 2021-05-06 14:04:18 -13 33 20 46
portfolio_id man_id d_id m_type m_dt ins_amount p_tot_prev total
1 1 1000 D 2021-05-06 14:04:17.879911+01 11111111 33 11111144
1 rows affected
p_id mid d_id typ m_dt amount t_prev d_tot t_t
1 1 1000 D 2021-05-06 14:04:18 33 0 33 33
2 1 1000 C 2021-05-06 14:04:18 -13 33 20 46
3 1 1000 D 2021-05-06 14:04:18 30 20 50 76
portfolio_id man_id d_id m_type m_dt m_amount
3 1 1000 D 2021-05-06 14:04:17.882751+01 1
1 rows affected
p_id mid d_id typ m_dt amount t_prev d_tot t_t
1 1 1000 D 2021-05-06 14:04:18 33 0 33 33
2 1 1000 C 2021-05-06 14:04:18 -13 33 20 46
3 1 1000 D 2021-05-06 14:04:18 30 20 50 76
4 1 1000 D 2021-05-06 14:04:18 75 50 125 151
1 rows affected
p_id mid d_id typ m_dt amount t_prev d_tot t_t
1 1 1000 D 2021-05-06 14:04:18 33 0 33 33
2 1 1000 C 2021-05-06 14:04:18 -13 33 20 46
3 1 1000 D 2021-05-06 14:04:18 30 20 50 76
4 1 1000 D 2021-05-06 14:04:18 75 50 125 151
5 1 1000 C 2021-05-06 14:04:18 -25 125 100 176
portfolio_id man_id d_id m_type m_dt m_amount d_tot_prev d_tot d_tot_all_trans
1 1 1000 D 2021-05-06 14:04:17.874563+01 33 0 33 33
2 1 1000 C 2021-05-06 14:04:17.878105+01 -13 33 20 46
3 1 1000 D 2021-05-06 14:04:17.880601+01 30 20 50 76
4 1 1000 D 2021-05-06 14:04:17.883123+01 75 50 125 151
5 1 1000 C 2021-05-06 14:04:17.884694+01 -25 125 100 176
3 rows affected
portfolio_id man_id d_id m_type m_dt m_amount d_tot_prev d_tot d_tot_all_trans
1 1 1000 D 2021-05-06 14:04:17.874563+01 33 0 33 33
2 1 1000 C 2021-05-06 14:04:17.878105+01 -13 33 20 46
3 1 1000 D 2021-05-06 14:04:17.880601+01 30 20 50 76
4 1 1000 D 2021-05-06 14:04:17.883123+01 75 50 125 151
5 1 1000 C 2021-05-06 14:04:17.884694+01 -25 125 100 176
6 1 1000 C 2000-01-01 00:00:00+00 50 -29 21 17
7 1 1000 D 2000-01-02 00:00:00+00 20 0 20 0
8 1 1000 C 2000-01-03 00:00:00+00 30 100 130 -100