Changeset: 0469d51d2922 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0469d51d2922 Modified Files: sql/server/rel_optimizer.c sql/test/BugTracker-2018/Tests/case_with_orderby_limit.Bug-6512.sql sql/test/BugTracker-2018/Tests/case_with_orderby_limit.Bug-6512.stable.out sql/test/pg_regress/Tests/loadwisconsin.sql sql/test/pg_regress/Tests/loadwisconsin.stable.out Branch: default Log Message:
Merge with Nov2019 diffs (truncated from 118857 to 300 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -1374,7 +1374,7 @@ static sql_exp * if (get_cmp(e) == cmp_or || get_cmp(e) == cmp_filter) { list *l, *r; - l = exps_push_down(sql, e->l, f, t); + l = exps_push_down(sql, e->l, f, t); if (!l) return NULL; r = exps_push_down(sql, e->r, f, t); @@ -1448,7 +1448,6 @@ exp_push_down(mvc *sql, sql_exp *e, sql_ return _exp_push_down(sql, e, f, t); } - /* some projections results are order dependend (row_number etc) */ static int project_unsafe(sql_rel *rel, int allow_identity) @@ -1760,13 +1759,13 @@ rel_push_count_down(int *changes, mvc *s if (!is_groupby(rel->op)) return rel; - r = rel->l; + r = rel->l; if (is_groupby(rel->op) && !rel_is_ref(rel) && - r && !r->exps && r->op == op_join && !(rel_is_ref(r)) && - /* currently only single count aggregation is handled, no other projects or aggregation */ - list_length(rel->exps) == 1 && exp_aggr_is_count(rel->exps->h->data)) { - sql_exp *nce, *oce; + r && !r->exps && r->op == op_join && !(rel_is_ref(r)) && + /* currently only single count aggregation is handled, no other projects or aggregation */ + list_length(rel->exps) == 1 && exp_aggr_is_count(rel->exps->h->data)) { + sql_exp *nce, *oce; sql_rel *gbl, *gbr; /* Group By */ sql_rel *cp; /* Cross Product */ sql_subfunc *mult; @@ -1780,7 +1779,7 @@ rel_push_count_down(int *changes, mvc *s rname = exp_relname(oce); name = exp_name(oce); - args = new_exp_list(sql->sa); + args = new_exp_list(sql->sa); srel = r->l; { sql_subaggr *cf = sql_bind_aggr(sql->sa, sql->session->schema, "count", NULL); @@ -6069,7 +6068,7 @@ exps_remove_dictexps(mvc *sql, list *exp static sql_rel * rel_remove_join(int *changes, mvc *sql, sql_rel *rel) { - if (is_join(rel->op) && !is_outerjoin(rel->op) && /* DISABLES CODE */ (0)) { + if (is_join(rel->op) && !is_outerjoin(rel->op)) { sql_rel *l = rel->l; sql_rel *r = rel->r; int lconst = 0, rconst = 0; @@ -6100,7 +6099,7 @@ rel_remove_join(int *changes, mvc *sql, list_merge(rel->exps, r->exps, (fdup)NULL); } } - if (is_join(rel->op) && /* DISABLES CODE */ (0)) { + if (is_join(rel->op)) { sql_rel *l = rel->l; sql_rel *r = rel->r; int ldict = 0, rdict = 0; @@ -6137,7 +6136,7 @@ rel_remove_join(int *changes, mvc *sql, * where non of the project_cols are from B and x=y is a foreign key join (B is the unique side) * and there are no filters on B */ - if (/* DISABLES CODE */ (0) && is_project(rel->op)) { + if (is_project(rel->op)) { sql_rel *j = rel->l; if (is_join(j->op)) { @@ -8354,7 +8353,7 @@ add_nulls(mvc *sql, sql_rel *rel, sql_re static sql_rel * rel_split_outerjoin(int *changes, mvc *sql, sql_rel *rel) { - if (/* DISABLES CODE */ (0) && (rel->op == op_left || rel->op == op_right || rel->op == op_full) && + if ((rel->op == op_left || rel->op == op_right || rel->op == op_full) && list_length(rel->exps) == 1 && exps_nr_of_or(rel->exps) == list_length(rel->exps)) { sql_rel *l = rel->l, *nl, *nll, *nlr; sql_rel *r = rel->r, *nr; @@ -9153,13 +9152,13 @@ optimize_rel(mvc *sql, sql_rel *rel, int * also joins between a relation and a DICT (which isn't used) * could be removed. * */ - if (gp.cnt[op_join] && gp.cnt[op_project]) + if (gp.cnt[op_join] && gp.cnt[op_project] && /* DISABLES CODE */ (0)) rel = rewrite(sql, rel, &rel_remove_join, &changes); if (gp.cnt[op_join] || - gp.cnt[op_left] || gp.cnt[op_right] || gp.cnt[op_full] || - gp.cnt[op_semi] || gp.cnt[op_anti] || - gp.cnt[op_select]) { + gp.cnt[op_left] || gp.cnt[op_right] || gp.cnt[op_full] || + gp.cnt[op_semi] || gp.cnt[op_anti] || + gp.cnt[op_select]) { rel = rewrite(sql, rel, &rel_find_range, &changes); if (value_based_opt) { rel = rel_project_reduce_casts(&changes, sql, rel); @@ -9179,38 +9178,15 @@ optimize_rel(mvc *sql, sql_rel *rel, int rel = rewrite(sql, rel, &rel_rewrite_types, &changes); - if (gp.cnt[op_anti] || gp.cnt[op_semi]) { - /* rewrite semijoin (A, join(A,B)) into semijoin (A,B) */ - rel = rewrite(sql, rel, &rel_rewrite_semijoin, &changes); - /* push semijoin through join */ - rel = rewrite(sql, rel, &rel_push_semijoin_down, &changes); - /* antijoin(a, union(b,c)) -> antijoin(antijoin(a,b), c) */ - rel = rewrite(sql, rel, &rel_rewrite_antijoin, &changes); - if (level <= 0) - rel = rewrite_topdown(sql, rel, &rel_semijoin_use_fk, &changes); - } - - if (gp.cnt[op_left] || gp.cnt[op_right] || gp.cnt[op_full]) + if ((gp.cnt[op_left] || gp.cnt[op_right] || gp.cnt[op_full]) && /* DISABLES CODE */ (0)) rel = rewrite_topdown(sql, rel, &rel_split_outerjoin, &changes); if (gp.cnt[op_select] || gp.cnt[op_project]) if (level == 1) /* only once */ rel = rewrite(sql, rel, &rel_merge_rse, &changes); - if (gp.cnt[op_select] && gp.cnt[op_join]) { - if (/* DISABLES CODE */ (0)) rel = rewrite_topdown(sql, rel, &rel_push_select_down_join, &changes); - rel = rewrite(sql, rel, &rel_remove_empty_select, &e_changes); - } - - if (gp.cnt[op_join] && gp.cnt[op_groupby]) { - rel = rewrite_topdown(sql, rel, &rel_push_count_down, &changes); - if (level <= 0) - rel = rewrite_topdown(sql, rel, &rel_push_join_down, &changes); - - /* push_join_down introduces semijoins */ - /* rewrite semijoin (A, join(A,B)) into semijoin (A,B) */ - rel = rewrite(sql, rel, &rel_rewrite_semijoin, &changes); - } + if (gp.cnt[op_select] && gp.cnt[op_join] && /* DISABLES CODE */ (0)) + rel = rewrite_topdown(sql, rel, &rel_push_select_down_join, &changes); if (gp.cnt[op_select]) rel = rewrite_topdown(sql, rel, &rel_push_select_down_union, &changes); @@ -9218,6 +9194,9 @@ optimize_rel(mvc *sql, sql_rel *rel, int if (gp.cnt[op_union] && gp.cnt[op_select]) rel = rewrite(sql, rel, &rel_remove_union_partitions, &changes); + if (gp.cnt[op_select]) + rel = rewrite(sql, rel, &rel_remove_empty_select, &e_changes); + if (gp.cnt[op_groupby]) { rel = rewrite_topdown(sql, rel, &rel_push_aggr_down, &changes); rel = rewrite_topdown(sql, rel, &rel_push_groupby_down, &changes); @@ -9240,6 +9219,28 @@ optimize_rel(mvc *sql, sql_rel *rel, int rel = rewrite(sql, rel, &rel_merge_identical_joins, &e_changes); } + /* Important -> Re-write semijoins after rel_join_order */ + if ((gp.cnt[op_join] || gp.cnt[op_semi] || gp.cnt[op_anti]) && gp.cnt[op_groupby]) { + rel = rewrite_topdown(sql, rel, &rel_push_count_down, &changes); + if (level <= 0) + rel = rewrite_topdown(sql, rel, &rel_push_join_down, &changes); + + /* push_join_down introduces semijoins */ + /* rewrite semijoin (A, join(A,B)) into semijoin (A,B) */ + rel = rewrite(sql, rel, &rel_rewrite_semijoin, &changes); + } + + if (gp.cnt[op_anti] || gp.cnt[op_semi]) { + /* rewrite semijoin (A, join(A,B)) into semijoin (A,B) */ + rel = rewrite(sql, rel, &rel_rewrite_semijoin, &changes); + /* push semijoin through join */ + rel = rewrite(sql, rel, &rel_push_semijoin_down, &changes); + /* antijoin(a, union(b,c)) -> antijoin(antijoin(a,b), c) */ + rel = rewrite(sql, rel, &rel_rewrite_antijoin, &changes); + if (level <= 0) + rel = rewrite_topdown(sql, rel, &rel_semijoin_use_fk, &changes); + } + /* Important -> Make sure rel_push_select_down gets called after rel_join_order, because pushing down select expressions makes rel_join_order more difficult */ if (gp.cnt[op_select] || gp.cnt[op_semi]) { diff --git a/sql/test/BugTracker-2018/Tests/case_with_orderby_limit.Bug-6512.sql b/sql/test/BugTracker-2018/Tests/case_with_orderby_limit.Bug-6512.sql --- a/sql/test/BugTracker-2018/Tests/case_with_orderby_limit.Bug-6512.sql +++ b/sql/test/BugTracker-2018/Tests/case_with_orderby_limit.Bug-6512.sql @@ -1,5 +1,6 @@ -- msqldump dump table BondPricesWithNulls Fri Jan 12 12:25:11 2018 -- MonetDB v11.27.11 (Jul2017-SP3), 'visokio_DEC2016' +START TRANSACTION; CREATE TABLE "sys"."BondPricesWithNulls" ( "Category" VARCHAR(255), "Field 2" TIMESTAMP, @@ -24,898 +25,899 @@ CREATE TABLE "sys"."BondPricesWithNulls" "_visokio_row_id_" BIGINT NOT NULL, CONSTRAINT "BondPricesWithNulls_PK" PRIMARY KEY ("_visokio_row_id_") ); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1997-05-13 00:00:00.000000', 'XS0076061927', 'ABBEY', NULL, 'N', '8.75', NULL, NULL, NULL, '4.5 07', 'BBB-', 'BB+', 'Y', 5, 105.855, 5.252, NULL, NULL, 88, 0); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, NULL, 'HBOS', 'BANK OF SCOTLAND', 'N', '8.375', 'Y', '30-Oct-2006 00:00:00', 'UT2', '7.5 06', NULL, 'BBB+', 'Y', 5, 104.635, 4.565, NULL, NULL, 18, 1); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2004-11-04 00:00:00.000000', 'XS0204938798', NULL, 'SL MACS PLC', NULL, '6.546', 'Y', '06-Jan-2020 00:00:00', NULL, '8 21', 'BBB+', NULL, NULL, 4, 106.255, NULL, 5.292, 155, 132, 2); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2005-06-15 00:00:00.000000', 'XS0220428154', 'ANGIRI', 'LAMBAY CAPTL SECURITIES', 'N', NULL, NULL, '16-Jun-2015 00:00:00', NULL, NULL, 'BBB+', NULL, 'N', NULL, 102.41, 5.835, NULL, NULL, NULL, 3); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-10-02 00:00:00.000000', 'XS0177600920', 'ZURNVX', NULL, NULL, NULL, 'Y', '02-Oct-2022 00:00:00', 'Other', NULL, NULL, NULL, NULL, 3, 110.187, NULL, 5.347, 135, 113, 4); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2004-03-26 00:00:00.000000', NULL, 'FSPAA', 'SWEDBANK', NULL, '5.75', NULL, '17-Mar-2016 00:00:00', 'T1', NULL, 'A-', 'A-', 'Y', NULL, NULL, 5.162, 5.07, 95, 69, 5); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0179407910', 'HSBC', 'HSBC BANK FUNDING STER', 'N', '5.844', 'Y', '05-Nov-2031 00:00:00', 'T1', '4.25 32', NULL, 'A', NULL, 3, 108.097, NULL, 5.241, NULL, 79, 6); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2002-04-19 00:00:00.000000', 'XS0145875513', 'BACR', 'BARCLAYS BANK PLC', 'N', '6.125', 'Y', '19-Apr-2027 00:00:00', NULL, '6 28', 'AA-', NULL, NULL, 3, 113.35, 5.031, 4.918, 80, 57, 7); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2003-05-09 00:00:00.000000', NULL, NULL, 'EGG BANKING PLC', NULL, '7.5', 'Y', '09-Dec-2013 00:00:00', 'UT2', NULL, NULL, NULL, 'N', NULL, 111.692, 5.626, 5.162, 143, 116, 8); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2001-11-28 00:00:00.000000', NULL, 'HBOS', 'HBOS CAPITAL FUNDING LP', 'N', '6.461', 'Y', '30-Nov-2018 00:00:00', 'T1', NULL, 'A', 'A-', 'N', 3, 112.493, 5.157, 5.004, 95, 69, 9); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-11-28 00:00:00.000000', NULL, 'HBOS', 'HBOS PLC', 'N', '5.75', 'Y', NULL, 'UT2', '5 25', 'A+', 'A', 'Y', NULL, NULL, NULL, 5.002, NULL, NULL, 10); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2001-05-11 00:00:00.000000', NULL, NULL, NULL, 'N', '8.103', 'Y', '11-May-2016 00:00:00', 'T1', '4.75 15', 'BBB+', NULL, 'N', NULL, NULL, NULL, 5.331, NULL, 78, 11); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-07-18 00:00:00.000000', NULL, 'NBHSS', 'NORDEA BANK FINLAND PLC', NULL, '6.25', NULL, NULL, 'UT2', '5 14', 'A', NULL, 'Y', 4, 108.851, 4.945, 4.832, 75, 47, 12); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-11-27 00:00:00.000000', 'XS0120327571', NULL, 'BARCLAYS BANK PLC', NULL, NULL, 'Y', '27-Nov-2015 00:00:00', 'UT2', '4.75 15', 'AA-', NULL, 'Y', 3, 114.818, 4.944, 4.735, NULL, 46, 13); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2005-03-16 00:00:00.000000', 'XS0214342569', 'DANBNK', 'DANSKE BANK A/S', 'N', NULL, 'Y', NULL, 'T1', '4.75 15', 'A+', NULL, 'Y', 4, 103.74, 5.062, 4.857, NULL, NULL, 14); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-09-28 00:00:00.000000', 'XS0117972967', 'ABBEY', NULL, 'N', '7.5', 'Y', '28-Sep-2015 00:00:00', 'UT2', '4.75 15', NULL, 'A-', 'Y', 3, NULL, 4.99, 4.874, 78, 50, 15); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-05-26 00:00:00.000000', NULL, 'HBOS', 'HBOS PLC', 'N', '7.5', NULL, NULL, 'UT2', NULL, NULL, NULL, 'Y', NULL, 119.509, 5.051, 4.812, NULL, NULL, 16); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2001-07-23 00:00:00.000000', 'XS0133173137', 'ABBEY', 'SCOTTISH MUTUAL ASSURANC', 'N', NULL, NULL, '25-Mar-2021 00:00:00', 'Other', '8 21', 'BBB-', NULL, NULL, 4, NULL, 6.261, 5.962, 201, 179, 17); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1999-11-05 00:00:00.000000', 'XS0103961743', NULL, 'CLERICAL MEDICAL FIN PLC', 'N', '7.375', NULL, '05-Nov-2019 00:00:00', 'Other', NULL, 'A+', NULL, NULL, 4, 120.214, 5.249, 4.844, NULL, 77, 18); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '1993-08-12 00:00:00.000000', NULL, NULL, 'ROYAL BK OF SCOTLAND PLC', 'N', '9.5', NULL, '12-Aug-2018 00:00:00', 'UT2', '4.75 15', NULL, NULL, 'N', NULL, 141.635, 5.007, NULL, 80, 54, 19); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '1999-07-15 00:00:00.000000', 'XS0099507534', 'LLOYDS', 'LLOYDS TSB BANK PLC', NULL, '6.5', 'Y', '15-Jul-2019 00:00:00', 'UT2', '8 21', 'AA', 'A', NULL, NULL, 113.903, 5.025, NULL, NULL, NULL, 20); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0222208539', 'BACR', 'BARCLAYS BANK PLC', 'N', '6', NULL, '15-Dec-2017 00:00:00', 'T1', NULL, 'AA-', 'BBB', NULL, 3, 102.988, NULL, 4.793, 137, 109, 21); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1997-04-23 00:00:00.000000', 'XS0075423565', 'HSBC', NULL, NULL, NULL, 'Y', '07-Dec-2007 00:00:00', 'UT2', '4.5 07', 'A+', 'A-', 'Y', 5, NULL, 4.555, 4.492, NULL, 18, 22); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2004-12-16 00:00:00.000000', 'XS0208374891', 'BUPA', 'BUPA FINANCE PLC', 'N', NULL, 'Y', '16-Sep-2020 00:00:00', 'Other', NULL, 'BBB', 'BBB', 'N', 4, 104.427, 5.601, 5.518, 135, 111, 23); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1996-07-22 00:00:00.000000', 'XS0067584101', 'SOCGEN', 'SOCIETE GENERALE', 'N', '9.125', NULL, NULL, NULL, '7.5 06', NULL, 'BBB', 'Y', 5, 105.677, 4.778, 4.434, 69, 40, 24); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0201559811', 'MQB', 'MACQUARIE CAP FUNDING', NULL, '6.177', 'Y', NULL, 'T1', NULL, NULL, 'A-', 'Y', 3, 108.483, 5.338, 5.507, NULL, 85, 25); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2005-06-29 00:00:00.000000', 'XS0223265462', 'STALIF', 'STANDARD LIFE FUNDING BV', NULL, NULL, 'Y', '29-Jun-2015 00:00:00', NULL, '4.75 15', 'BBB+', 'BBB-', NULL, 4, 102.643, 5.787, 5.142, 158, 130, 26); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2004-03-22 00:00:00.000000', 'XS0188550114', 'ALLNCE', 'ALLIANCE & LEICESTER PLC', NULL, '5.827', NULL, '22-Mar-2016 00:00:00', 'T1', '4.75 15', 'A', 'A-', 'Y', 4, 105.239, 5.108, NULL, NULL, NULL, 27); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2005-03-24 00:00:00.000000', 'XS0215556142', NULL, NULL, 'N', NULL, NULL, '24-Mar-2020 00:00:00', NULL, '8 21', 'BBB', NULL, NULL, 3, NULL, 5.77, 5.505, 152, 128, 28); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-09-29 00:00:00.000000', 'XS0177447983', 'AVLN', 'AVIVA PLC', 'N', '6.125', 'Y', '29-Sep-2022 00:00:00', NULL, NULL, 'A-', 'BBB+', NULL, 3, NULL, 5.269, 5.132, NULL, 80, 29); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-04-19 00:00:00.000000', 'XS0145875190', 'BACR', NULL, 'N', NULL, 'Y', '19-Apr-2017 00:00:00', NULL, NULL, NULL, NULL, 'Y', 3, 111.861, NULL, 4.769, NULL, 47, 30); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-04-29 00:00:00.000000', 'XS0167366433', NULL, 'N', '5.625', 'Y', '20-Dec-2013 00:00:00', 'UT2', '5 14', NULL, NULL, 'N', NULL, 102.179, 5.224, NULL, 103, 76, NULL, 31); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0138939854', NULL, 'ROYAL BK OF SCOTLAND PLC', 'N', '5.625', 'Y', NULL, 'UT2', NULL, 'AA-', NULL, 'Y', 3, NULL, 5.084, NULL, 85, 67, 32); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0154144132', 'RBS', 'ROYAL BK OF SCOTLAND PLC', NULL, NULL, NULL, '16-Sep-2026 00:00:00', 'UT2', NULL, 'AA-', 'A+', 'Y', 4, 106.223, NULL, 4.915, NULL, 61, 33); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2001-02-28 00:00:00.000000', 'XS0125686229', 'HBOS', 'BANK OF SCOTLAND', 'N', '7.281', 'Y', '31-May-2026 00:00:00', NULL, '5 25', NULL, NULL, 'Y', 5, 125.351, NULL, 4.952, 102, 80, 34); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2002-07-12 00:00:00.000000', 'XS0151267878', 'STALIF', NULL, 'N', '6.75', NULL, NULL, 'Other', '6 28', 'A-', 'BBB', 'N', 4, 112.604, 5.648, NULL, 141, 119, 35); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2000-10-30 00:00:00.000000', 'XS0119816402', 'STANLN', 'STANDARD CHARTERED BANK', NULL, NULL, NULL, '31-Jan-2022 00:00:00', 'UT2', '8 21', 'A-', NULL, 'Y', 4, NULL, 5.221, 5.215, NULL, 75, 36); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2004-10-21 00:00:00.000000', 'XS0203782551', NULL, 'RABOBANK CAP FD TRUST IV', 'N', '5.556', 'Y', '31-Dec-2019 00:00:00', NULL, '8 21', 'AA', 'AA-', NULL, 4, 106.451, 4.86, NULL, 61, 38, 37); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2000-09-28 00:00:00.000000', NULL, NULL, 'ABBEY NATIONAL PLC', NULL, '7.5', 'Y', '28-Sep-2010 00:00:00', 'UT2', '4 09', 'A', NULL, 'Y', NULL, 112.131, 4.754, 4.642, NULL, NULL, 38); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2000-04-17 00:00:00.000000', 'XS0110560165', 'HSBC', 'HSBC CAPITAL FUNDING LP', 'N', '8.208', NULL, '30-Jun-2015 00:00:00', 'T1', '4.75 15', 'A', 'A-', NULL, 3, 123.375, 5.087, NULL, NULL, 60, 39); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '1999-10-05 00:00:00.000000', 'XS0102493680', NULL, 'NATIONAL WESTMINSTER BK', 'N', '7.125', NULL, '05-Oct-2022 00:00:00', 'UT2', '8 21', 'AA-', NULL, NULL, 4, 122.538, 5.058, NULL, 81, 59, 40); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, NULL, NULL, 'FP FINANCE PLC', 'N', NULL, 'Y', '25-Nov-2006 00:00:00', 'Other', '7.5 06', NULL, 'BBB', 'Y', 5, 105.592, 4.747, 4.439, 66, 36, 41); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1993-11-04 00:00:00.000000', NULL, NULL, 'BANK OF SCOTLAND', 'N', NULL, 'Y', '04-Nov-2013 00:00:00', 'UT2', '5 14', NULL, NULL, NULL, 4, 123.659, 5.001, 4.674, 80, 53, 42); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1999-06-17 00:00:00.000000', 'XS0098556961', 'NRBS', 'NORTHERN ROCK PLC', 'N', '6.75', NULL, '17-Jun-2024 00:00:00', NULL, '5 25', 'A-', 'A-', 'Y', NULL, 117.298, 5.214, 5.275, 97, NULL, 43); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1996-11-28 00:00:00.000000', NULL, 'SLAC', NULL, 'N', '9', 'Y', '28-Nov-2006 00:00:00', 'Other', '7.5 06', NULL, 'BB+', 'Y', 5, 104.649, 5.322, 4.623, NULL, 94, 44); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0206633082', NULL, 'ROYAL BK OF SCOTLAND PLC', 'N', '5.5', 'Y', '03-Dec-2019 00:00:00', NULL, NULL, 'AA-', 'A', NULL, 3, 103.945, 5.039, NULL, 79, 56, 45); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '1996-03-21 00:00:00.000000', 'XS0064538647', 'HSBC', NULL, 'N', NULL, 'Y', NULL, 'UT2', NULL, 'A+', NULL, 'Y', 5, 106.164, 4.557, 4.434, NULL, 17, 46); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2004-06-03 00:00:00.000000', NULL, NULL, NULL, NULL, NULL, 'Y', '08-Sep-2014 00:00:00', 'UT2', '5 14', 'AA-', NULL, NULL, NULL, 107.517, 4.897, 4.705, 70, 42, 47); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, NULL, NULL, NULL, 'N', '6', 'Y', NULL, 'UT2', '8 21', NULL, 'BBB+', 'N', NULL, 105.528, NULL, 5.011, 111, 88, 48); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-09-29 00:00:00.000000', 'XS0177395901', 'NAB', 'NATIONAL CAPITAL TRUST', 'N', '5.62', 'Y', '17-Dec-2018 00:00:00', 'T1', '4.75 15', 'A', NULL, 'Y', 4, 104.082, 5.193, NULL, 99, 73, 49); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-03-28 00:00:00.000000', 'XS0145407507', NULL, 'LLOYDS TSB GROUP PLC', 'N', '6', NULL, '07-Jun-2032 00:00:00', 'UT2', NULL, NULL, 'A+', 'Y', NULL, 112.178, 5.088, 4.897, 86, 68, 50); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-04-14 00:00:00.000000', 'XS0166717388', 'HBOS', 'HBOS PLC', 'N', '5.75', 'Y', NULL, 'UT2', '8 21', 'A+', 'A', 'Y', 3, NULL, 5.142, 4.949, 89, NULL, 51); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2001-11-02 00:00:00.000000', 'XS0137784426', NULL, 'ROYAL BK OF SCOTLAND PLC', 'N', '6.25', NULL, '17-Dec-2012 00:00:00', NULL, '5 12', 'AA-', 'A', NULL, 4, 108.577, NULL, NULL, 64, NULL, 52); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-08-09 00:00:00.000000', 'XS0152838586', NULL, NULL, NULL, '6.984', 'Y', '09-Feb-2018 00:00:00', NULL, '4.75 15', 'A', 'A-', NULL, NULL, 116.928, NULL, 5.007, 93, 68, 53); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2001-02-28 00:00:00.000000', NULL, 'HBOS', NULL, 'N', '7.286', NULL, '31-May-2016 00:00:00', NULL, '4.75 15', 'AA-', 'A-', 'Y', NULL, 117.699, 5.142, NULL, NULL, 67, 54); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-07-04 00:00:00.000000', NULL, NULL, 'BARCLAYS BANK PLC', 'N', NULL, 'Y', '15-Jun-2032 00:00:00', NULL, NULL, 'AA-', 'A', 'Y', 3, 111.263, 5.216, 4.992, 99, 81, 55); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-10-24 00:00:00.000000', 'XS0118932366', 'BACR', NULL, 'N', '7.125', NULL, '24-Oct-2020 00:00:00', 'UT2', '8 21', 'AA-', 'A', 'Y', NULL, 121.238, 5.026, 4.828, NULL, 54, 56); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-09-21 00:00:00.000000', NULL, 'NRBS', 'NORTHERN ROCK PLC', NULL, NULL, NULL, '21-Sep-2015 00:00:00', NULL, '4.75 15', 'A-', 'BBB+', NULL, NULL, NULL, 5.21, 5.028, 100, 72, 57); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-03-14 00:00:00.000000', NULL, 'HBOS', 'BK OF SCOTLAND CAP FUND', NULL, NULL, NULL, NULL, 'T1', NULL, NULL, 'A-', 'Y', 5, 126.833, NULL, 4.972, NULL, NULL, 58); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1999-10-05 00:00:00.000000', 'XS0102493508', 'RBS', 'NATIONAL WESTMINSTER BK', 'N', '7.625', 'Y', NULL, 'UT2', '4 09', NULL, 'A-', NULL, 4, NULL, 4.721, NULL, NULL, 31, 59); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1993-05-12 00:00:00.000000', 'XS0043398519', 'BACR', 'BARCLAYS BANK PLC', 'N', '9.875', 'Y', '12-May-2008 00:00:00', 'UT2', NULL, 'AA-', 'A-', 'Y', 4, NULL, 4.54, 4.455, 51, 17, 60); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0083932144', 'HBOS', NULL, 'N', '7.375', 'Y', NULL, NULL, '8 21', NULL, NULL, 'N', 5, 124.614, 5.135, NULL, 88, NULL, 61); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1996-12-11 00:00:00.000000', 'XS0071285760', NULL, 'SKANDINAVISKA ENSKILDA', NULL, NULL, NULL, '11-Dec-2006 00:00:00', 'UT2', '7.5 06', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 62); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0206511486', 'AVLN', 'AVIVA PLC', 'N', '5.902', 'Y', '27-Jul-2020 00:00:00', 'Other', '8 21', NULL, NULL, 'N', 3, NULL, 5.409, 5.091, 116, 92, 63); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1995-08-10 00:00:00.000000', 'XS0059171230', NULL, NULL, 'N', NULL, 'Y', '10-Aug-2015 00:00:00', NULL, '4.75 15', 'AA-', NULL, NULL, 5, 139.558, 5.063, NULL, 86, 58, 64); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0189704140', 'HSBC', NULL, 'N', '5.862', NULL, '07-Apr-2020 00:00:00', 'T1', NULL, 'A+', 'A-', 'Y', 4, 106.139, NULL, NULL, 93, 70, 65); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-12-19 00:00:00.000000', 'BE0119284710', 'KBC', 'KBC BANK NV', 'N', '6.202', 'Y', NULL, 'T1', NULL, NULL, 'A-', 'Y', NULL, 109.073, 5.216, NULL, 97, 74, 66); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-06-09 00:00:00.000000', NULL, 'LLOYDS', 'LLOYDS TSB BANK PLC', 'N', '5.125', NULL, NULL, 'UT2', '4.75 15', 'AA', NULL, 'Y', 3, 100.849, 4.96, NULL, 75, 49, 67); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-03-22 00:00:00.000000', 'XS0144810529', 'RBS', 'ROYAL BK OF SCOTLAND PLC', 'N', NULL, 'Y', NULL, NULL, NULL, 'AA-', 'A', 'Y', 3, 111.942, 5.052, 4.855, NULL, NULL, 68); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0165122655', 'BKIR', 'BANK OF IRELAND HOLDINGS', 'N', '6.25', 'Y', NULL, NULL, NULL, 'A', 'A-', NULL, 4, 110.37, NULL, 5.108, NULL, NULL, 69); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, NULL, 'ANGIRI', 'ANGLO IRISH ASSET FIN', 'N', NULL, NULL, '28-Jun-2011 00:00:00', 'T1', NULL, 'BBB+', NULL, 'N', NULL, 117.495, 5.097, 5.016, 95, 66, 70); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2002-08-21 00:00:00.000000', NULL, 'NRBS', 'NORTHERN ROCK PLC', 'N', '7.053', 'Y', '21-Sep-2027 00:00:00', NULL, NULL, 'A-', 'A-', 'Y', NULL, 119.817, 5.412, NULL, 118, NULL, 71); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, NULL, 'ABBEY', 'ABBEY NATIONAL PLC', 'N', NULL, NULL, NULL, 'T1', '5 25', 'A', 'A', 'Y', 4, NULL, NULL, NULL, 99, NULL, 72); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0148995888', 'CRDSUI', 'CRED SUISSE GP FIN (GRN)', 'N', '6.875', 'Y', NULL, NULL, NULL, 'A', 'A-', 'Y', NULL, 113.813, NULL, NULL, 101, 73, 73); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0117973429', NULL, 'ABBEY NATIONAL PLC', 'N', '7.125', NULL, '30-Sep-2030 00:00:00', 'UT2', NULL, 'A', 'A', 'Y', 4, NULL, 5.127, 5.179, 89, 72, 74); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-08-31 00:00:00.000000', NULL, 'RBS', NULL, NULL, '7.375', 'Y', '31-Aug-2010 00:00:00', 'UT2', '4 09', 'AA-', 'A-', NULL, 5, 111.546, 4.729, 4.599, 68, 32, 75); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0109138536', 'HBOS', 'BK OF SCOTLAND CAP FUND', 'N', '8.117', 'Y', NULL, 'T1', '4 09', 'A+', NULL, NULL, NULL, NULL, NULL, 4.594, 81, 45, 76); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1999-07-15 00:00:00.000000', NULL, 'LLOYDS', 'LLOYDS TSB BANK PLC', 'N', NULL, 'Y', NULL, 'UT2', NULL, 'AA', 'A-', 'Y', 3, 108.071, 4.722, 4.541, 67, 31, 77); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'USU073081064', 'BAVB', NULL, 'N', NULL, 'Y', '15-Jul-2008 00:00:00', NULL, NULL, NULL, 'BBB+', NULL, 5, NULL, 4.811, 4.784, NULL, 44, 78); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0222434200', 'STANLN', 'STANDARD CHARTERED BANK', NULL, '5.375', 'Y', NULL, NULL, NULL, 'A-', NULL, 'Y', NULL, 100.821, 5.225, NULL, 97, 74, 79); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1997-09-29 00:00:00.000000', 'XS0079927850', 'LLOYDS', 'LLOYDS TSB BANK PLC', 'N', '8', 'Y', NULL, 'UT2', NULL, 'AA', NULL, 'Y', NULL, NULL, 5.037, 4.807, 79, 57, 80); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2005-05-12 00:00:00.000000', 'XS0221879025', 'HBOS', 'HBOS PLC', 'N', NULL, 'Y', '12-May-2015 00:00:00', NULL, '4.75 15', 'A+', 'BBB', 'Y', NULL, 103.236, 5.654, NULL, 145, 117, 81); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '1996-11-27 00:00:00.000000', 'XS0071252919', 'BACR', 'WOOLWICH PLC', 'N', NULL, 'Y', '27-Nov-2021 00:00:00', NULL, NULL, 'AA', 'A', 'N', 5, NULL, NULL, 4.816, 78, 55, 82); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2004-11-15 00:00:00.000000', NULL, 'HBOS', 'HBOS PLC', 'N', '5.625', NULL, '15-Nov-2019 00:00:00', 'UT2', NULL, 'A+', NULL, 'Y', NULL, 104.34, 5.12, 4.904, 87, 64, 83); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, NULL, 'XS0059124742', 'CRDSUI', 'CRED SUISSE FIRST BOST I', 'N', '10.25', 'Y', '17-Aug-2015 00:00:00', 'UT2', '4.75 15', 'A', 'BBB+', 'Y', NULL, 137.842, 5.243, 4.891, 104, 76, 84); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2004-03-30 00:00:00.000000', NULL, NULL, 'LEGAL & GENERAL GROUP', 'N', '5.875', 'Y', '01-Apr-2019 00:00:00', NULL, NULL, 'A', NULL, 'N', NULL, 107.02, 5.154, 4.927, 90, NULL, 85); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-11-21 00:00:00.000000', 'XS0181161380', 'FRIPRO', 'FRIENDS PROVIDENT PLC', NULL, '6.875', 'Y', '21-Nov-2019 00:00:00', 'Other', '8 21', 'BBB+', NULL, 'Y', 4, 112.529, NULL, NULL, NULL, 111, 86); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2003-06-20 00:00:00.000000', 'FR0000475790', 'ACAFP', NULL, NULL, NULL, 'Y', NULL, 'UT2', '4.75 15', NULL, 'A', 'Y', 3, 99.869, 4.952, 4.8, 74, 49, 87); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-03-04 00:00:00.000000', 'XS0144223582', 'SVSKHB', NULL, 'N', NULL, 'Y', '04-Mar-2009 00:00:00', 'UT2', '4 09', 'A+', 'A-', NULL, 4, 104.767, 4.613, 4.527, 56, NULL, 88); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2003-03-14 00:00:00.000000', NULL, 'RBS', 'ROYAL BK OF SCOTLAND PLC', 'N', NULL, 'Y', '14-Mar-2016 00:00:00', 'UT2', '4.75 15', NULL, NULL, 'Y', 3, 100.797, 4.961, NULL, 75, 49, 89); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '2001-06-22 00:00:00.000000', 'XS0131038522', 'SANTAN', 'SANTANDER CENTRAL HISPAN', NULL, '7.25', NULL, '07-Dec-2011 00:00:00', 'UT2', '5 12', 'A+', 'A-', 'N', NULL, 112.723, 4.825, 4.659, NULL, 39, 90); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-07-23 00:00:00.000000', NULL, 'ANGIRI', 'ANGLO IRISH ASSET FIN', 'N', '7.625', 'Y', '23-Jul-2027 00:00:00', 'T1', '6 28', 'BBB+', 'A-', NULL, NULL, NULL, 5.408, NULL, 117, NULL, 91); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0121856859', NULL, NULL, 'N', '7.387', NULL, '31-Dec-2010 00:00:00', 'T1', '4 09', 'A+', 'A-', 'N', 4, 111.82, 4.809, NULL, 76, 40, 92); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2002-05-29 00:00:00.000000', NULL, NULL, 'BRADFORD & BINGLEY CAP', 'N', NULL, 'Y', NULL, NULL, '4.25 32', 'A-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 93); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2000-09-28 00:00:00.000000', 'XS0117973262', 'ABBEY', 'ABBEY NATIONAL PLC', 'N', '7.375', 'Y', NULL, 'UT2', '8 21', 'A', 'A', NULL, 5, NULL, 5.1, NULL, 85, NULL, 94); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0112553291', NULL, 'CRED SUISSE GRP CAP III', 'N', '8.514', 'Y', '15-Jun-2015 00:00:00', NULL, '4.75 15', NULL, 'BBB+', NULL, NULL, 123.476, NULL, 4.909, 112, 84, 95); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, NULL, 'LLOYDS', 'LLOYDS TSB CAPITAL 2', 'N', '7.834', 'Y', '07-Feb-2015 00:00:00', 'T1', '4.75 15', 'AA-', 'A-', 'Y', 4, 119.853, 5.086, NULL, 88, NULL, 96); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '1994-01-07 00:00:00.000000', 'XS0047897417', 'PRUFIN', 'PRUDENTIAL PLC', 'N', '8.5', 'Y', '30-Jun-2018 00:00:00', 'Other', '4.75 15', NULL, 'A-', 'N', 5, 130.992, 5.098, 4.788, NULL, 63, 97); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0099507963', 'LLOYDS', 'LLOYDS TSB BANK PLC', NULL, '6.5', 'Y', '16-Jul-2029 00:00:00', 'UT2', '6 28', 'AA', 'A+', 'Y', NULL, 118.963, 5.047, 4.87, 81, 64, 98); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, NULL, 'HBOS', NULL, 'N', NULL, 'Y', '09-Dec-2031 00:00:00', 'T1', '4.25 32', 'A+', 'A', 'Y', 4, 136.301, 5.226, 5.081, 100, NULL, 99); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', '2005-06-30 00:00:00.000000', NULL, NULL, 'FRIENDS PROVIDENT PLC', 'N', '6.292', 'Y', '01-Jul-2015 00:00:00', 'Other', '4.75 15', NULL, NULL, NULL, 3, 103.87, 5.689, NULL, 148, 120, 100); -INSERT INTO "sys"."BondPricesWithNulls" VALUES (NULL, '1997-07-10 00:00:00.000000', 'XS0077451259', NULL, NULL, 'N', '8.25', 'Y', '10-Jul-2009 00:00:00', 'UT2', '4 09', 'A', 'BBB+', 'Y', NULL, NULL, 4.8, 4.605, 75, 41, 101); -INSERT INTO "sys"."BondPricesWithNulls" VALUES ('Subordinated', NULL, 'XS0067383892', 'HBOS', 'HALIFAX PLC', 'N', NULL, 'N', NULL, 'LT2', '7.5 06', 'AA-', 'BBB+', NULL, 3, 104.009, NULL, 4.354, 44, 2, 102); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list