sql - MonetDB - Table added to merge table multiple times, can't remove or drop it -


i have monetdb merge table 620 million rows of data in it, let's call merge_table. has 14 member tables, each containing monthly data (e.g. data1701 january 2017). java program handles loading data database , adding/removing member tables somehow managed add same table merge table multiple times. problem can't remove these duplicated tables merge table, though monetdb says operation successful:

alter table myschema.merge_table drop table data1708; 

operation successful (0.608ms)

then, when try drop table:

drop table myschema.data1708; 

drop table: unable drop table data1708 (there database objects depend on it)

of course, when list members of merge_table, data1708 still there.

is there other method use remove these duplicates?

edit:

monetdb version 11.25.23 (monetdbd[21491] 1.7 (dec2016-sp5)). jdbc version 2.19.

running drop table command multiple times yields same results. trying add of tables again doesn't work, works expected without jdbc:

alter table myschema.merge_table add table data1708; 

alter table: table 'myschema.data1708' part of merge table 'myschema.merge_table'

the id of merge table 9020, ran rest of suggested queries that:

select * sys.dependencies join sys.dependency_types on depend_type = dependency_type_id depend_id = 9020; +-------+-----------+-------------+--------------------+----------------------+ | id | depend_id | depend_type | dependency_type_id | dependency_type_name | +=======+===========+=============+====================+======================+ | 9668 | 9020 | 2 | 2 | table | | 9722 | 9020 | 2 | 2 | table | | 9776 | 9020 | 2 | 2 | table | | 9830 | 9020 | 2 | 2 | table | | 9884 | 9020 | 2 | 2 | table | | 9938 | 9020 | 2 | 2 | table | | 13891 | 9020 | 2 | 2 | table | | 13945 | 9020 | 2 | 2 | table | | 13999 | 9020 | 2 | 2 | table | | 14053 | 9020 | 2 | 2 | table | | 14107 | 9020 | 2 | 2 | table | | 14161 | 9020 | 2 | 2 | table | | 14215 | 9020 | 2 | 2 | table | | 14269 | 9020 | 2 | 2 | table | +-------+-----------+-------------+--------------------+----------------------+

select * sys.objects id = 9020; +------+------------+------+ | id | name | nr | +======+============+======+ | 9020 | data1607 | 1 | | 9020 | data1608 | 2 | | 9020 | data1609 | 3 | | 9020 | data1610 | 4 | | 9020 | data1611 | 5 | | 9020 | data1612 | 6 | | 9020 | data1701 | 7 | | 9020 | data1702 | 8 | | 9020 | data1703 | 9 | | 9020 | data1704 | 10 | | 9020 | data1705 | 11 | | 9020 | data1706 | 12 | | 9020 | data1707 | 13 | | 9020 | data1707 | 12 | | 9020 | data1708 | 13 | | 9020 | data1707 | 12 | | 9020 | data1708 | 13 | +------+------------+------+

first, completeness, version of monetdb using , version of jdbc driver? also, take running the

alter table myschema.merge_table drop table data1708; 

a second time didn't make issue go away?

i tried - without jdbc - following script:

drop schema if exists demo; create schema demo; set schema demo;  create table template (i int, j int);  create table foo (like template); insert foo values (1,10), (2,20);  create table bar (like template); insert bar values (3,30);  create merge table merged (like template); alter table merged add table foo; alter table merged add table bar; alter table merged add table bar;  alter table merged drop table bar;  drop table bar;  select * merged; 

this works correctly. is, second 'alter add bar' yields error message , drop table bar succeeds. try doing similar using toy java program?

also, before doing that, peek in 'sys' schema? in particular,

select * sys.tables name = 'merge_table'; 

to figure out id of merge table.

select *  sys.dependencies join sys.dependency_types  on depend_type = dependency_type_id  depend_id = <merge-table-id>; 

and

select * sys.objects id = <merge-table-id>; 

note trying modify these tables 'fix' things not work intended. i'm curious current state.

joeri


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -