Instruction Requriments: How to install? How long it will take to download the file ? Instruction: 1)This dataset has data from 1975 to now for sched_a, sched_b, sched_e and ofec_committee_history (that has data like fec.gov). It is updated weekly (Sat). The top part is only for user reference on how long the download based on that dataset of last Aug, as an example on how to use this dataset as guideline. Note, the data changes every week and the structure is same but meta data are not upgraded (e.g., table count(*) etc). The data partitions are every 2 years, e.g., 1975-1976,..., 2019_2020, 2021_2022. The data is growing weekly. The data will be double for every 2.5 years. Please increase the download time and size accordingly. 2)download the data files from https://cg-519a459a-0ea3-42c2-b7bc-fa1143481f74.s3-us-gov-west-1.amazonaws.com/bulk-downloads/index.html?prefix=bulk-downloads/data-dump/schedules/ 3)copy to the .dump file into local path 4)restore Requriments (this is the test env. we are using at FEC): Disk: 2Tb (if incl indexes), 300Gb (if no index) (required) Install postgresSQL database: version 9.6+ (required) OS: unix is better (Optional) CPU: 4cpu, 50GB (Optional, see the following) How to create restore structure? Login in psql (you can create DB and user with postgres role,run following CREATE SCHEMA disclosure; grant all on schema disclosure to public; CREATE EXTENSION pg_trgm; CREATE EXTENSION btree_gin; =================test samples (Note: the dataset is upgraded weekly. This sample is just for reference of old dataset): Test on download time time: from https://cg-519a459a-0ea3-42c2-b7bc-fa1143481f74.s3-us-gov-west-1.amazonaws.com/bulk-downloads/index.html?prefix=bulk-downloads/data-dump/schedules/ download to local machine downloadToLocal(min) copyToserver(min) wget(min) 2021-03-04T17:00:44.000Z 87.45 KB README.txt 1 1 1 2021-02-28T18:34:52.000Z 47.18 GB fec_fitem_sched_a.dump 150 421 200 2021-02-28T18:35:19.000Z 16.94 GB fec_fitem_sched_b.dump 50 123 95 2021-02-28T18:36:18.000Z 35.94 MB fec_fitem_sched_e.dump 1 1 1 2021-02-28T18:36:33.000Z 30.4 MB ofec_committee_history.dump 1 1 1 Hardware: 4cpu, 50Gb memeory network speed 1.75MB/s Test on time: download to local machine from the URL --(Note: the dataset is upgraded weekly. This sample is just for reference of old dataset) 2020-08-31T16:46:19.000Z 19.57 KB README.txt min 2020-08-30T16:59:36.000Z 33.61 GB fec_fitem_sched_a.dump 125 2020-08-30T16:59:15.000Z 10.57 GB fec_fitem_sched_b.dump 40 2020-08-30T16:57:44.000Z 32.54 MB fec_fitem_sched_e.dump 1 2020-08-30T16:58:42.000Z 28.54 MB ofec_committee_history.dump 1 ---2020-08-30 dataset.(Note: the dataset is upgraded weekly. This sample is just for reference of old dataset) select count(*) from disclosure.ofec_committee_history --restore 1min 242346 rows 9 index select count(*) from disclosure.fec_fitem_sched_e --restore 1min 340729 rows no index select count(*) from disclosure.fec_fitem_sched_b --182544742 rows index 30 for each partitions select count(*) from disclosure.fec_fitem_sched_a ---362016701 index 34 ------------How to restore to use the download files How to restore? from command line pg_restore --dbname --no-acl --no-owner /path/fec_fitem_sched_b.dump e.g., ---------========restore table and data With index ( 45 hrs) =========------------------ --note: --PGPASSWORD=: fecdbpwd is whatever your DB access user password --username=: fecdb is your DB access user --/u02/dumps/: is your --- ofec_committee_history(1 min) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb /u02/dumps/ofec_committee_history.dump & ---sched_e (1 min) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb /u02/dumps/fec_fitem_sched_e.dump & ---sched_b (12 hrs) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb /u02/dumps/fec_fitem_sched_b.dump & ---sched_a (35 hrs) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb /u02/dumps/fec_fitem_sched_a.dump & ---------========restore table and data Without index ( data only: 7 hrs) =========------------------ --- ofec_committee_history (1 min) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb --table ofec_committee_history /u02/dumps/ofec_committee_history.dump & ---sched_e (1 min) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb --table fec_fitem_sched_e /u02/dumps/fec_fitem_sched_e.dump & ---sched_b (1.5 2hr) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb --table fec_fitem_sched_b \ --table fec_fitem_sched_b_1975_1976 \ --table fec_fitem_sched_b_1977_1978 \ --table fec_fitem_sched_b_1979_1980 \ --table fec_fitem_sched_b_1981_1982 \ --table fec_fitem_sched_b_1983_1984 \ --table fec_fitem_sched_b_1985_1986 \ --table fec_fitem_sched_b_1987_1988 \ --table fec_fitem_sched_b_1989_1990 \ --table fec_fitem_sched_b_1991_1992 \ --table fec_fitem_sched_b_1993_1994 \ --table fec_fitem_sched_b_1995_1996 \ --table fec_fitem_sched_b_1997_1998 \ --table fec_fitem_sched_b_1999_2000 \ --table fec_fitem_sched_b_2001_2002 \ --table fec_fitem_sched_b_2003_2004 \ --table fec_fitem_sched_b_2005_2006 \ --table fec_fitem_sched_b_2007_2008 \ --table fec_fitem_sched_b_2009_2010 \ --table fec_fitem_sched_b_2011_2012 \ --table fec_fitem_sched_b_2013_2014 \ --table fec_fitem_sched_b_2015_2016 \ --table fec_fitem_sched_b_2017_2018 \ --table fec_fitem_sched_b_2019_2020 \ --table fec_fitem_sched_b_2021_2022 /u02/dumps/fec_fitem_sched_b.dump & ---sched_a (5 hrs) PGPASSWORD=fecdbpwd nohup /usr/pgsql-11/bin/pg_restore --dbname testdata --no-acl --no-owner --username=fecdb --table fec_fitem_sched_a \ --table fec_fitem_sched_a_1975_1976 \ --table fec_fitem_sched_a_1977_1978 \ --table fec_fitem_sched_a_1979_1980 \ --table fec_fitem_sched_a_1981_1982 \ --table fec_fitem_sched_a_1983_1984 \ --table fec_fitem_sched_a_1985_1986 \ --table fec_fitem_sched_a_1987_1988 \ --table fec_fitem_sched_a_1989_1990 \ --table fec_fitem_sched_a_1991_1992 \ --table fec_fitem_sched_a_1993_1994 \ --table fec_fitem_sched_a_1995_1996 \ --table fec_fitem_sched_a_1997_1998 \ --table fec_fitem_sched_a_1999_2000 \ --table fec_fitem_sched_a_2001_2002 \ --table fec_fitem_sched_a_2003_2004 \ --table fec_fitem_sched_a_2005_2006 \ --table fec_fitem_sched_a_2007_2008 \ --table fec_fitem_sched_a_2009_2010 \ --table fec_fitem_sched_a_2011_2012 \ --table fec_fitem_sched_a_2013_2014 \ --table fec_fitem_sched_a_2015_2016 \ --table fec_fitem_sched_a_2017_2018 \ --table fec_fitem_sched_a_2019_2020 \ --table fec_fitem_sched_a_2021_2022 /u02/dumps/fec_fitem_sched_a.dump & How to verify the result? e.g, postgres=# select count(*) from disclosure.fec_fitem_sched_b_1975_1976; count ------- 39350 (1 row) How to query the data? login and run sqls, e.g., ----sample1: how to join the tables to get everything like the api-like result SELECT * FROM disclosure.fec_fitem_sched_a LEFT OUTER JOIN disclosure.ofec_committee_history AS ofec_committee_history_1 ON disclosure.fec_fitem_sched_a.cmte_id = ofec_committee_history_1.committee_id AND disclosure.fec_fitem_sched_a.two_year_transaction_period = ofec_committee_history_1.cycle LEFT OUTER JOIN disclosure.ofec_committee_history AS ofec_committee_history_2 ON disclosure.fec_fitem_sched_a.cmte_id = ofec_committee_history_2.committee_id AND disclosure.fec_fitem_sched_a.two_year_transaction_period = ofec_committee_history_2.cycle WHERE disclosure.fec_fitem_sched_a.two_year_transaction_period IN (2020) AND disclosure.fec_fitem_sched_a.contb_receipt_dt >= '1/1/2019' AND disclosure.fec_fitem_sched_a.contb_receipt_dt <= '12/31/2020' ORDER BY disclosure.fec_fitem_sched_a.contb_receipt_dt DESC, disclosure.fec_fitem_sched_a.sub_id DESC LIMIT 20 ----sample2: how to join the tables to get everything like the api-like result SELECT disclosure.fec_fitem_sched_a.cmte_id AS disclosure_fec_fitem_sched_a_cmte_id, disclosure.fec_fitem_sched_a.rpt_yr AS disclosure_fec_fitem_sched_a_rpt_yr, disclosure.fec_fitem_sched_a.rpt_tp AS disclosure_fec_fitem_sched_a_rpt_tp, disclosure.fec_fitem_sched_a.image_num AS disclosure_fec_fitem_sched_a_image_num, disclosure.fec_fitem_sched_a.line_num AS disclosure_fec_fitem_sched_a_line_num, disclosure.fec_fitem_sched_a.tran_id AS disclosure_fec_fitem_sched_a_tran_id, disclosure.fec_fitem_sched_a.file_num AS disclosure_fec_fitem_sched_a_file_num, disclosure.fec_fitem_sched_a.cmte_nm AS disclosure_fec_fitem_sched_a_cmte_nm, disclosure.fec_fitem_sched_a.entity_tp AS disclosure_fec_fitem_sched_a_entity_tp, disclosure.fec_fitem_sched_a.entity_tp_desc AS disclosure_fec_fitem_sched_a_entity_tp_desc, disclosure.fec_fitem_sched_a.contbr_id AS disclosure_fec_fitem_sched_a_contbr_id, disclosure.fec_fitem_sched_a.contbr_prefix AS disclosure_fec_fitem_sched_a_contbr_prefix, disclosure.fec_fitem_sched_a.contbr_nm AS disclosure_fec_fitem_sched_a_contbr_nm, disclosure.fec_fitem_sched_a.cmte_tp AS disclosure_fec_fitem_sched_a_cmte_tp, disclosure.fec_fitem_sched_a.org_tp AS disclosure_fec_fitem_sched_a_org_tp, disclosure.fec_fitem_sched_a.cmte_dsgn AS disclosure_fec_fitem_sched_a_cmte_dsgn, disclosure.fec_fitem_sched_a.contbr_nm_first AS disclosure_fec_fitem_sched_a_contbr_nm_first, disclosure.fec_fitem_sched_a.contbr_m_nm AS disclosure_fec_fitem_sched_a_contbr_m_nm, disclosure.fec_fitem_sched_a.contbr_nm_last AS disclosure_fec_fitem_sched_a_contbr_nm_last, disclosure.fec_fitem_sched_a.contbr_suffix AS disclosure_fec_fitem_sched_a_contbr_suffix, disclosure.fec_fitem_sched_a.contbr_st1 AS disclosure_fec_fitem_sched_a_contbr_st1, disclosure.fec_fitem_sched_a.contbr_st2 AS disclosure_fec_fitem_sched_a_contbr_st2, disclosure.fec_fitem_sched_a.contbr_city AS disclosure_fec_fitem_sched_a_contbr_city, disclosure.fec_fitem_sched_a.contbr_st AS disclosure_fec_fitem_sched_a_contbr_st, disclosure.fec_fitem_sched_a.contbr_zip AS disclosure_fec_fitem_sched_a_contbr_zip, disclosure.fec_fitem_sched_a.contbr_employer AS disclosure_fec_fitem_sched_a_contbr_employer, disclosure.fec_fitem_sched_a.contbr_occupation AS disclosure_fec_fitem_sched_a_contbr_occupation, disclosure.fec_fitem_sched_a.clean_contbr_id AS disclosure_fec_fitem_sched_a_clean_contbr_id, disclosure.fec_fitem_sched_a.receipt_tp AS disclosure_fec_fitem_sched_a_receipt_tp, disclosure.fec_fitem_sched_a.receipt_tp_desc AS disclosure_fec_fitem_sched_a_receipt_tp_desc, disclosure.fec_fitem_sched_a.receipt_desc AS disclosure_fec_fitem_sched_a_receipt_desc, disclosure.fec_fitem_sched_a.memo_cd AS disclosure_fec_fitem_sched_a_memo_cd, disclosure.fec_fitem_sched_a.memo_cd_desc AS disclosure_fec_fitem_sched_a_memo_cd_desc, disclosure.fec_fitem_sched_a.contb_receipt_dt AS disclosure_fec_fitem_sched_a_contb_receipt_dt, disclosure.fec_fitem_sched_a.contb_receipt_amt AS disclosure_fec_fitem_sched_a_contb_receipt_amt, disclosure.fec_fitem_sched_a.contb_aggregate_ytd AS disclosure_fec_fitem_sched_a_contb_aggregate_ytd, disclosure.fec_fitem_sched_a.cand_id AS disclosure_fec_fitem_sched_a_cand_id, disclosure.fec_fitem_sched_a.cand_nm AS disclosure_fec_fitem_sched_a_cand_nm, disclosure.fec_fitem_sched_a.cand_nm_first AS disclosure_fec_fitem_sched_a_cand_nm_first, disclosure.fec_fitem_sched_a.cand_nm_last AS disclosure_fec_fitem_sched_a_cand_nm_last, disclosure.fec_fitem_sched_a.cand_m_nm AS disclosure_fec_fitem_sched_a_cand_m_nm, disclosure.fec_fitem_sched_a.cand_prefix AS disclosure_fec_fitem_sched_a_cand_prefix, disclosure.fec_fitem_sched_a.cand_suffix AS disclosure_fec_fitem_sched_a_cand_suffix, disclosure.fec_fitem_sched_a.cand_office AS disclosure_fec_fitem_sched_a_cand_office, disclosure.fec_fitem_sched_a.cand_office_desc AS disclosure_fec_fitem_sched_a_cand_office_desc, disclosure.fec_fitem_sched_a.cand_office_st AS disclosure_fec_fitem_sched_a_cand_office_st, disclosure.fec_fitem_sched_a.cand_office_st_desc AS disclosure_fec_fitem_sched_a_cand_office_st_desc, disclosure.fec_fitem_sched_a.cand_office_district AS disclosure_fec_fitem_sched_a_cand_office_district, disclosure.fec_fitem_sched_a.conduit_cmte_id AS disclosure_fec_fitem_sched_a_conduit_cmte_id, disclosure.fec_fitem_sched_a.conduit_cmte_nm AS disclosure_fec_fitem_sched_a_conduit_cmte_nm, disclosure.fec_fitem_sched_a.conduit_cmte_st1 AS disclosure_fec_fitem_sched_a_conduit_cmte_st1, disclosure.fec_fitem_sched_a.conduit_cmte_st2 AS disclosure_fec_fitem_sched_a_conduit_cmte_st2, disclosure.fec_fitem_sched_a.conduit_cmte_city AS disclosure_fec_fitem_sched_a_conduit_cmte_city, disclosure.fec_fitem_sched_a.conduit_cmte_st AS disclosure_fec_fitem_sched_a_conduit_cmte_st, disclosure.fec_fitem_sched_a.conduit_cmte_zip AS disclosure_fec_fitem_sched_a_conduit_cmte_zip, disclosure.fec_fitem_sched_a.donor_cmte_nm AS disclosure_fec_fitem_sched_a_donor_cmte_nm, disclosure.fec_fitem_sched_a.national_cmte_nonfed_acct AS disclosure_fec_fitem_sched_a_national_cmte_nonfed_acct, disclosure.fec_fitem_sched_a.election_tp AS disclosure_fec_fitem_sched_a_election_tp, disclosure.fec_fitem_sched_a.election_tp_desc AS disclosure_fec_fitem_sched_a_election_tp_desc, disclosure.fec_fitem_sched_a.fec_election_tp_desc AS disclosure_fec_fitem_sched_a_fec_election_tp_desc, disclosure.fec_fitem_sched_a.fec_election_yr AS disclosure_fec_fitem_sched_a_fec_election_yr, disclosure.fec_fitem_sched_a.action_cd AS disclosure_fec_fitem_sched_a_action_cd, disclosure.fec_fitem_sched_a.action_cd_desc AS disclosure_fec_fitem_sched_a_action_cd_desc, disclosure.fec_fitem_sched_a.schedule_type_desc AS disclosure_fec_fitem_sched_a_schedule_type_desc, disclosure.fec_fitem_sched_a.pg_date AS disclosure_fec_fitem_sched_a_pg_date, disclosure.fec_fitem_sched_a.orig_sub_id AS disclosure_fec_fitem_sched_a_orig_sub_id, disclosure.fec_fitem_sched_a.back_ref_tran_id AS disclosure_fec_fitem_sched_a_back_ref_tran_id, disclosure.fec_fitem_sched_a.back_ref_sched_nm AS disclosure_fec_fitem_sched_a_back_ref_sched_nm, disclosure.fec_fitem_sched_a.filing_form AS disclosure_fec_fitem_sched_a_filing_form, disclosure.fec_fitem_sched_a.link_id AS disclosure_fec_fitem_sched_a_link_id, disclosure.fec_fitem_sched_a.contributor_name_text AS disclosure_fec_fitem_sched_a_contributor_name_text, disclosure.fec_fitem_sched_a.contributor_employer_text AS disclosure_fec_fitem_sched_a_contributor_employer_text, disclosure.fec_fitem_sched_a.contributor_occupation_text AS disclosure_fec_fitem_sched_a_contributor_occupation_text, disclosure.fec_fitem_sched_a.is_individual AS disclosure_fec_fitem_sched_a_is_individual, disclosure.fec_fitem_sched_a.memo_text AS disclosure_fec_fitem_sched_a_memo_text, disclosure.fec_fitem_sched_a.two_year_transaction_period AS disclosure_fec_fitem_sched_a_two_year_transaction_period, disclosure.fec_fitem_sched_a.schedule_type AS disclosure_fec_fitem_sched_a_schedule_type, disclosure.fec_fitem_sched_a.increased_limit AS disclosure_fec_fitem_sched_a_increased_limit, disclosure.fec_fitem_sched_a.sub_id AS disclosure_fec_fitem_sched_a_sub_id, disclosure.fec_fitem_sched_a.pdf_url AS disclosure_fec_fitem_sched_a_pdf_url, disclosure.fec_fitem_sched_a.line_number_label AS disclosure_fec_fitem_sched_a_line_number_label, ofec_committee_history_mv_1.idx AS ofec_committee_history_mv_1_idx, ofec_committee_history_mv_1.name AS ofec_committee_history_mv_1_name, ofec_committee_history_mv_1.committee_id AS ofec_committee_history_mv_1_committee_id, ofec_committee_history_mv_1.cycles AS ofec_committee_history_mv_1_cycles, ofec_committee_history_mv_1.treasurer_name AS ofec_committee_history_mv_1_treasurer_name, ofec_committee_history_mv_1.treasurer_text AS ofec_committee_history_mv_1_treasurer_text, ofec_committee_history_mv_1.committee_type AS ofec_committee_history_mv_1_committee_type, ofec_committee_history_mv_1.committee_type_full AS ofec_committee_history_mv_1_committee_type_full, ofec_committee_history_mv_1.filing_frequency AS ofec_committee_history_mv_1_filing_frequency, ofec_committee_history_mv_1.designation AS ofec_committee_history_mv_1_designation, ofec_committee_history_mv_1.designation_full AS ofec_committee_history_mv_1_designation_full, ofec_committee_history_mv_1.organization_type AS ofec_committee_history_mv_1_organization_type, ofec_committee_history_mv_1.organization_type_full AS ofec_committee_history_mv_1_organization_type_full, ofec_committee_history_mv_1.affiliated_committee_name AS ofec_committee_history_mv_1_affiliated_committee_name, ofec_committee_history_mv_1.party AS ofec_committee_history_mv_1_party, ofec_committee_history_mv_1.party_full AS ofec_committee_history_mv_1_party_full, ofec_committee_history_mv_1.state AS ofec_committee_history_mv_1_state, ofec_committee_history_mv_1.street_1 AS ofec_committee_history_mv_1_street_1, ofec_committee_history_mv_1.street_2 AS ofec_committee_history_mv_1_street_2, ofec_committee_history_mv_1.city AS ofec_committee_history_mv_1_city, ofec_committee_history_mv_1.state_full AS ofec_committee_history_mv_1_state_full, ofec_committee_history_mv_1.zip AS ofec_committee_history_mv_1_zip, ofec_committee_history_mv_1.candidate_ids AS ofec_committee_history_mv_1_candidate_ids, ofec_committee_history_mv_1.cycle AS ofec_committee_history_mv_1_cycle, ofec_committee_history_mv_1.cycles_has_financial AS ofec_committee_history_mv_1_cycles_has_financial, ofec_committee_history_mv_1.last_cycle_has_financial AS ofec_committee_history_mv_1_last_cycle_has_financial, ofec_committee_history_mv_1.cycles_has_activity AS ofec_committee_history_mv_1_cycles_has_activity, ofec_committee_history_mv_1.last_cycle_has_activity AS ofec_committee_history_mv_1_last_cycle_has_activity, ofec_committee_history_mv_1.is_active AS ofec_committee_history_mv_1_is_active, ofec_committee_history_mv_2.idx AS ofec_committee_history_mv_2_idx, ofec_committee_history_mv_2.name AS ofec_committee_history_mv_2_name, ofec_committee_history_mv_2.committee_id AS ofec_committee_history_mv_2_committee_id, ofec_committee_history_mv_2.cycles AS ofec_committee_history_mv_2_cycles, ofec_committee_history_mv_2.treasurer_name AS ofec_committee_history_mv_2_treasurer_name, ofec_committee_history_mv_2.treasurer_text AS ofec_committee_history_mv_2_treasurer_text, ofec_committee_history_mv_2.committee_type AS ofec_committee_history_mv_2_committee_type, ofec_committee_history_mv_2.committee_type_full AS ofec_committee_history_mv_2_committee_type_full, ofec_committee_history_mv_2.filing_frequency AS ofec_committee_history_mv_2_filing_frequency, ofec_committee_history_mv_2.designation AS ofec_committee_history_mv_2_designation, ofec_committee_history_mv_2.designation_full AS ofec_committee_history_mv_2_designation_full, ofec_committee_history_mv_2.organization_type AS ofec_committee_history_mv_2_organization_type, ofec_committee_history_mv_2.organization_type_full AS ofec_committee_history_mv_2_organization_type_full, ofec_committee_history_mv_2.affiliated_committee_name AS ofec_committee_history_mv_2_affiliated_committee_name, ofec_committee_history_mv_2.party AS ofec_committee_history_mv_2_party, ofec_committee_history_mv_2.party_full AS ofec_committee_history_mv_2_party_full, ofec_committee_history_mv_2.state AS ofec_committee_history_mv_2_state, ofec_committee_history_mv_2.street_1 AS ofec_committee_history_mv_2_street_1, ofec_committee_history_mv_2.street_2 AS ofec_committee_history_mv_2_street_2, ofec_committee_history_mv_2.city AS ofec_committee_history_mv_2_city, ofec_committee_history_mv_2.state_full AS ofec_committee_history_mv_2_state_full, ofec_committee_history_mv_2.zip AS ofec_committee_history_mv_2_zip, ofec_committee_history_mv_2.candidate_ids AS ofec_committee_history_mv_2_candidate_ids, ofec_committee_history_mv_2.cycle AS ofec_committee_history_mv_2_cycle, ofec_committee_history_mv_2.cycles_has_financial AS ofec_committee_history_mv_2_cycles_has_financial, ofec_committee_history_mv_2.last_cycle_has_financial AS ofec_committee_history_mv_2_last_cycle_has_financial, ofec_committee_history_mv_2.cycles_has_activity AS ofec_committee_history_mv_2_cycles_has_activity, ofec_committee_history_mv_2.last_cycle_has_activity AS ofec_committee_history_mv_2_last_cycle_has_activity, ofec_committee_history_mv_2.is_active AS ofec_committee_history_mv_2_is_active FROM disclosure.fec_fitem_sched_a LEFT OUTER JOIN disclosure.ofec_committee_history AS ofec_committee_history_mv_1 ON disclosure.fec_fitem_sched_a.cmte_id = ofec_committee_history_mv_1.committee_id AND disclosure.fec_fitem_sched_a.two_year_transaction_period = ofec_committee_history_mv_1.cycle LEFT OUTER JOIN disclosure.ofec_committee_history AS ofec_committee_history_mv_2 ON disclosure.fec_fitem_sched_a.clean_contbr_id = ofec_committee_history_mv_2.committee_id AND disclosure.fec_fitem_sched_a.two_year_transaction_period = ofec_committee_history_mv_2.cycle WHERE disclosure.fec_fitem_sched_a.two_year_transaction_period IN (2020) AND (disclosure.fec_fitem_sched_a.contributor_name_text @@ to_tsquery('C00656314:*') OR disclosure.fec_fitem_sched_a.contributor_name_text @@ to_tsquery('C00647701:*') OR disclosure.fec_fitem_sched_a.contributor_name_text @@ to_tsquery('C00664938:*') OR disclosure.fec_fitem_sched_a.contributor_name_text @@ to_tsquery('C00667865:*')) ORDER BY disclosure.fec_fitem_sched_a.contb_receipt_dt DESC, disclosure.fec_fitem_sched_a.sub_id DESC LIMIT 30 Note: Please ignore the following error while you do the restore with indexes pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 6353; 2620 119277 TRIGGER fec_fitem_sched_e tri_fec_fitem_sched_e fec pg_restore: [archiver (db)] could not execute query: ERROR: function disclosure.fec_fitem_sched_e_insert() does not exist Command was: CREATE TRIGGER tri_fec_fitem_sched_e BEFORE INSERT ON disclosure.fec_fitem_sched_e FOR EACH ROW EXECUTE PROCEDURE disclosure.fec_fitem_sched_e_insert(); REFERENCE: 1)Table defination: -- Table: disclosure.ofec_committee_history -- DROP TABLE disclosure.ofec_committee_history; CREATE TABLE disclosure.ofec_committee_history ( idx bigint, cycle numeric(4,0), committee_id character varying(9) COLLATE pg_catalog."default", name character varying(200) COLLATE pg_catalog."default", treasurer_name character varying(90) COLLATE pg_catalog."default", treasurer_text tsvector, organization_type character varying(1) COLLATE pg_catalog."default", organization_type_full text COLLATE pg_catalog."default", street_1 character varying(34) COLLATE pg_catalog."default", street_2 character varying(34) COLLATE pg_catalog."default", city character varying(30) COLLATE pg_catalog."default", state character varying(2) COLLATE pg_catalog."default", state_full text COLLATE pg_catalog."default", zip character varying(9) COLLATE pg_catalog."default", treasurer_city character varying(30) COLLATE pg_catalog."default", treasurer_name_1 character varying(20) COLLATE pg_catalog."default", treasurer_name_2 character varying(30) COLLATE pg_catalog."default", treasurer_name_middle character varying(20) COLLATE pg_catalog."default", treasurer_phone character varying(10) COLLATE pg_catalog."default", treasurer_name_prefix character varying(10) COLLATE pg_catalog."default", treasurer_state character varying(2) COLLATE pg_catalog."default", treasurer_street_1 character varying(34) COLLATE pg_catalog."default", treasurer_street_2 character varying(34) COLLATE pg_catalog."default", treasurer_name_suffix character varying(10) COLLATE pg_catalog."default", treasurer_name_title character varying(20) COLLATE pg_catalog."default", treasurer_zip character varying(9) COLLATE pg_catalog."default", custodian_city character varying(30) COLLATE pg_catalog."default", custodian_name_1 character varying(20) COLLATE pg_catalog."default", custodian_name_2 character varying(30) COLLATE pg_catalog."default", custodian_name_middle character varying(20) COLLATE pg_catalog."default", custodian_name_full character varying(90) COLLATE pg_catalog."default", custodian_phone character varying(10) COLLATE pg_catalog."default", custodian_name_prefix character varying(10) COLLATE pg_catalog."default", custodian_state character varying(2) COLLATE pg_catalog."default", custodian_street_1 character varying(34) COLLATE pg_catalog."default", custodian_street_2 character varying(34) COLLATE pg_catalog."default", custodian_name_suffix character varying(10) COLLATE pg_catalog."default", custodian_name_title character varying(20) COLLATE pg_catalog."default", custodian_zip character varying(9) COLLATE pg_catalog."default", email character varying(90) COLLATE pg_catalog."default", fax character varying(12) COLLATE pg_catalog."default", website character varying(90) COLLATE pg_catalog."default", form_type text COLLATE pg_catalog."default", leadership_pac character varying(1) COLLATE pg_catalog."default", lobbyist_registrant_pac character varying(1) COLLATE pg_catalog."default", party_type character varying(3) COLLATE pg_catalog."default", party_type_full character varying(90) COLLATE pg_catalog."default", qualifying_date timestamp without time zone, first_file_date date, last_file_date date, last_f1_date date, designation character varying(1) COLLATE pg_catalog."default", designation_full text COLLATE pg_catalog."default", committee_type character varying(1) COLLATE pg_catalog."default", committee_type_full text COLLATE pg_catalog."default", filing_frequency character varying(1) COLLATE pg_catalog."default", party character varying(3) COLLATE pg_catalog."default", party_full character varying(50) COLLATE pg_catalog."default", cycles integer[], candidate_ids text[] COLLATE pg_catalog."default", affiliated_committee_name character varying(200) COLLATE pg_catalog."default", last_cycle_has_financial integer, cycles_has_financial integer[], last_cycle_has_activity integer, cycles_has_activity integer[], is_active boolean ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE disclosure.ofec_committee_history OWNER to fec; -- Index: idx_ofec_committee_history_comid_state -- DROP INDEX disclosure.idx_ofec_committee_history_comid_state; CREATE INDEX idx_ofec_committee_history_comid_state ON disclosure.ofec_committee_history USING btree (committee_id COLLATE pg_catalog."default" ASC NULLS LAST, state COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_committee_id -- DROP INDEX disclosure.idx_ofec_committee_history_committee_id; CREATE INDEX idx_ofec_committee_history_committee_id ON disclosure.ofec_committee_history USING btree (committee_id COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_cycle -- DROP INDEX disclosure.idx_ofec_committee_history_cycle; CREATE INDEX idx_ofec_committee_history_cycle ON disclosure.ofec_committee_history USING btree (cycle ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_cycle_committee_id -- DROP INDEX disclosure.idx_ofec_committee_history_cycle_committee_id; CREATE INDEX idx_ofec_committee_history_cycle_committee_id ON disclosure.ofec_committee_history USING btree (cycle ASC NULLS LAST, committee_id COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_designation -- DROP INDEX disclosure.idx_ofec_committee_history_designation; CREATE INDEX idx_ofec_committee_history_designation ON disclosure.ofec_committee_history USING btree (designation COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_first_file_date -- DROP INDEX disclosure.idx_ofec_committee_history_first_file_date; CREATE INDEX idx_ofec_committee_history_first_file_date ON disclosure.ofec_committee_history USING btree (first_file_date ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_idx -- DROP INDEX disclosure.idx_ofec_committee_history_idx; CREATE UNIQUE INDEX idx_ofec_committee_history_idx ON disclosure.ofec_committee_history USING btree (idx ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_name -- DROP INDEX disclosure.idx_ofec_committee_history_name; CREATE INDEX idx_ofec_committee_history_name ON disclosure.ofec_committee_history USING btree (name COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_ofec_committee_history_state -- DROP INDEX disclosure.idx_ofec_committee_history_state; CREATE INDEX idx_ofec_committee_history_state ON disclosure.ofec_committee_history USING btree (state COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Table: disclosure.fec_fitem_sched_e -- DROP TABLE disclosure.fec_fitem_sched_e; CREATE TABLE disclosure.fec_fitem_sched_e ( cmte_id character varying(9) COLLATE pg_catalog."default", cmte_nm character varying(200) COLLATE pg_catalog."default", pye_nm character varying(200) COLLATE pg_catalog."default", payee_l_nm character varying(30) COLLATE pg_catalog."default", payee_f_nm character varying(20) COLLATE pg_catalog."default", payee_m_nm character varying(20) COLLATE pg_catalog."default", payee_prefix character varying(10) COLLATE pg_catalog."default", payee_suffix character varying(10) COLLATE pg_catalog."default", pye_st1 character varying(34) COLLATE pg_catalog."default", pye_st2 character varying(34) COLLATE pg_catalog."default", pye_city character varying(30) COLLATE pg_catalog."default", pye_st character varying(2) COLLATE pg_catalog."default", pye_zip character varying(9) COLLATE pg_catalog."default", entity_tp character varying(3) COLLATE pg_catalog."default", entity_tp_desc character varying(50) COLLATE pg_catalog."default", exp_desc character varying(100) COLLATE pg_catalog."default", catg_cd character varying(3) COLLATE pg_catalog."default", catg_cd_desc character varying(40) COLLATE pg_catalog."default", s_o_cand_id character varying(9) COLLATE pg_catalog."default", s_o_cand_nm character varying(90) COLLATE pg_catalog."default", s_o_cand_nm_first character varying(38) COLLATE pg_catalog."default", s_o_cand_nm_last character varying(38) COLLATE pg_catalog."default", s_o_cand_m_nm character varying(20) COLLATE pg_catalog."default", s_o_cand_prefix character varying(10) COLLATE pg_catalog."default", s_o_cand_suffix character varying(10) COLLATE pg_catalog."default", s_o_cand_office character varying(1) COLLATE pg_catalog."default", s_o_cand_office_desc character varying(20) COLLATE pg_catalog."default", s_o_cand_office_st character varying(2) COLLATE pg_catalog."default", s_o_cand_office_st_desc character varying(20) COLLATE pg_catalog."default", s_o_cand_office_district character varying(2) COLLATE pg_catalog."default", s_o_ind character varying(3) COLLATE pg_catalog."default", s_o_ind_desc character varying(50) COLLATE pg_catalog."default", election_tp character varying(5) COLLATE pg_catalog."default", fec_election_tp_desc character varying(20) COLLATE pg_catalog."default", cal_ytd_ofc_sought numeric(14,2), dissem_dt timestamp without time zone, exp_amt numeric(14,2), exp_dt timestamp without time zone, exp_tp character varying(3) COLLATE pg_catalog."default", exp_tp_desc character varying(90) COLLATE pg_catalog."default", memo_cd character varying(1) COLLATE pg_catalog."default", memo_cd_desc character varying(50) COLLATE pg_catalog."default", memo_text character varying(100) COLLATE pg_catalog."default", conduit_cmte_id character varying(9) COLLATE pg_catalog."default", conduit_cmte_nm character varying(200) COLLATE pg_catalog."default", conduit_cmte_st1 character varying(34) COLLATE pg_catalog."default", conduit_cmte_st2 character varying(34) COLLATE pg_catalog."default", conduit_cmte_city character varying(30) COLLATE pg_catalog."default", conduit_cmte_st character varying(2) COLLATE pg_catalog."default", conduit_cmte_zip character varying(9) COLLATE pg_catalog."default", indt_sign_nm character varying(90) COLLATE pg_catalog."default", indt_sign_dt timestamp without time zone, notary_sign_nm character varying(90) COLLATE pg_catalog."default", notary_sign_dt timestamp without time zone, notary_commission_exprtn_dt timestamp without time zone, filer_l_nm character varying(30) COLLATE pg_catalog."default", filer_f_nm character varying(20) COLLATE pg_catalog."default", filer_m_nm character varying(20) COLLATE pg_catalog."default", filer_prefix character varying(10) COLLATE pg_catalog."default", filer_suffix character varying(10) COLLATE pg_catalog."default", action_cd character varying(1) COLLATE pg_catalog."default", action_cd_desc character varying(15) COLLATE pg_catalog."default", tran_id character varying(32) COLLATE pg_catalog."default", back_ref_tran_id character varying(32) COLLATE pg_catalog."default", back_ref_sched_nm character varying(8) COLLATE pg_catalog."default", schedule_type character varying(8) COLLATE pg_catalog."default", schedule_type_desc character varying(90) COLLATE pg_catalog."default", line_num character varying(12) COLLATE pg_catalog."default", image_num character varying(18) COLLATE pg_catalog."default", file_num numeric(7,0), link_id numeric(19,0), orig_sub_id numeric(19,0), sub_id numeric(19,0) NOT NULL, filing_form character varying(8) COLLATE pg_catalog."default" NOT NULL, rpt_tp character varying(3) COLLATE pg_catalog."default", rpt_yr numeric(4,0), election_cycle numeric(4,0), pdf_url text COLLATE pg_catalog."default", payee_name_text tsvector, pg_date timestamp without time zone DEFAULT now(), CONSTRAINT fec_fitem_sched_e_pkey PRIMARY KEY (sub_id) ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; -- Table: disclosure.fec_fitem_sched_b -- DROP TABLE disclosure.fec_fitem_sched_b; CREATE TABLE disclosure.fec_fitem_sched_b ( cmte_id character varying(9) COLLATE pg_catalog."default", recipient_cmte_id character varying(9) COLLATE pg_catalog."default", recipient_nm character varying(200) COLLATE pg_catalog."default", payee_l_nm character varying(30) COLLATE pg_catalog."default", payee_f_nm character varying(20) COLLATE pg_catalog."default", payee_m_nm character varying(20) COLLATE pg_catalog."default", payee_prefix character varying(10) COLLATE pg_catalog."default", payee_suffix character varying(10) COLLATE pg_catalog."default", payee_employer character varying(38) COLLATE pg_catalog."default", payee_occupation character varying(38) COLLATE pg_catalog."default", recipient_st1 character varying(34) COLLATE pg_catalog."default", recipient_st2 character varying(34) COLLATE pg_catalog."default", recipient_city character varying(30) COLLATE pg_catalog."default", recipient_st character varying(2) COLLATE pg_catalog."default", recipient_zip character varying(9) COLLATE pg_catalog."default", disb_desc character varying(100) COLLATE pg_catalog."default", catg_cd character varying(3) COLLATE pg_catalog."default", catg_cd_desc character varying(40) COLLATE pg_catalog."default", entity_tp character varying(3) COLLATE pg_catalog."default", entity_tp_desc character varying(50) COLLATE pg_catalog."default", election_tp character varying(5) COLLATE pg_catalog."default", fec_election_tp_desc character varying(20) COLLATE pg_catalog."default", fec_election_tp_year character varying(4) COLLATE pg_catalog."default", election_tp_desc character varying(20) COLLATE pg_catalog."default", cand_id character varying(9) COLLATE pg_catalog."default", cand_nm character varying(90) COLLATE pg_catalog."default", cand_nm_first character varying(38) COLLATE pg_catalog."default", cand_nm_last character varying(38) COLLATE pg_catalog."default", cand_m_nm character varying(20) COLLATE pg_catalog."default", cand_prefix character varying(10) COLLATE pg_catalog."default", cand_suffix character varying(10) COLLATE pg_catalog."default", cand_office character varying(1) COLLATE pg_catalog."default", cand_office_desc character varying(20) COLLATE pg_catalog."default", cand_office_st character varying(2) COLLATE pg_catalog."default", cand_office_st_desc character varying(20) COLLATE pg_catalog."default", cand_office_district character varying(2) COLLATE pg_catalog."default", disb_dt timestamp without time zone, disb_amt numeric(14,2), memo_cd character varying(1) COLLATE pg_catalog."default", memo_cd_desc character varying(50) COLLATE pg_catalog."default", memo_text character varying(100) COLLATE pg_catalog."default", disb_tp character varying(3) COLLATE pg_catalog."default", disb_tp_desc character varying(90) COLLATE pg_catalog."default", conduit_cmte_nm character varying(200) COLLATE pg_catalog."default", conduit_cmte_st1 character varying(34) COLLATE pg_catalog."default", conduit_cmte_st2 character varying(34) COLLATE pg_catalog."default", conduit_cmte_city character varying(30) COLLATE pg_catalog."default", conduit_cmte_st character varying(2) COLLATE pg_catalog."default", conduit_cmte_zip character varying(9) COLLATE pg_catalog."default", national_cmte_nonfed_acct character varying(9) COLLATE pg_catalog."default", ref_disp_excess_flg character varying(1) COLLATE pg_catalog."default", comm_dt timestamp without time zone, benef_cmte_nm character varying(200) COLLATE pg_catalog."default", semi_an_bundled_refund numeric(14,2), action_cd character varying(1) COLLATE pg_catalog."default", action_cd_desc character varying(15) COLLATE pg_catalog."default", tran_id character varying(32) COLLATE pg_catalog."default", back_ref_tran_id character varying(32) COLLATE pg_catalog."default", back_ref_sched_id character varying(8) COLLATE pg_catalog."default", schedule_type character varying(8) COLLATE pg_catalog."default", schedule_type_desc character varying(90) COLLATE pg_catalog."default", line_num character varying(12) COLLATE pg_catalog."default", image_num character varying(18) COLLATE pg_catalog."default", file_num numeric(7,0), link_id numeric(19,0), orig_sub_id numeric(19,0), sub_id numeric(19,0) NOT NULL, filing_form character varying(8) COLLATE pg_catalog."default" NOT NULL, rpt_tp character varying(3) COLLATE pg_catalog."default", rpt_yr numeric(4,0), two_year_transaction_period numeric(4,0), pdf_url text COLLATE pg_catalog."default", recipient_name_text tsvector, disbursement_description_text tsvector, disbursement_purpose_category character varying COLLATE pg_catalog."default", clean_recipient_cmte_id character varying(9) COLLATE pg_catalog."default", pg_date timestamp without time zone DEFAULT now(), line_number_label text COLLATE pg_catalog."default", cmte_tp character varying(1) COLLATE pg_catalog."default", org_tp character varying(1) COLLATE pg_catalog."default", cmte_dsgn character varying(1) COLLATE pg_catalog."default" ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; -- Table: disclosure.fec_fitem_sched_a -- DROP TABLE disclosure.fec_fitem_sched_a; CREATE TABLE disclosure.fec_fitem_sched_a ( cmte_id character varying(9) COLLATE pg_catalog."default", cmte_nm character varying(200) COLLATE pg_catalog."default", contbr_id character varying(9) COLLATE pg_catalog."default", contbr_nm character varying(200) COLLATE pg_catalog."default", contbr_nm_first character varying(38) COLLATE pg_catalog."default", contbr_m_nm character varying(20) COLLATE pg_catalog."default", contbr_nm_last character varying(38) COLLATE pg_catalog."default", contbr_prefix character varying(10) COLLATE pg_catalog."default", contbr_suffix character varying(10) COLLATE pg_catalog."default", contbr_st1 character varying(34) COLLATE pg_catalog."default", contbr_st2 character varying(34) COLLATE pg_catalog."default", contbr_city character varying(30) COLLATE pg_catalog."default", contbr_st character varying(2) COLLATE pg_catalog."default", contbr_zip character varying(9) COLLATE pg_catalog."default", entity_tp character varying(3) COLLATE pg_catalog."default", entity_tp_desc character varying(50) COLLATE pg_catalog."default", contbr_employer character varying(38) COLLATE pg_catalog."default", contbr_occupation character varying(38) COLLATE pg_catalog."default", election_tp character varying(5) COLLATE pg_catalog."default", fec_election_tp_desc character varying(20) COLLATE pg_catalog."default", fec_election_yr character varying(4) COLLATE pg_catalog."default", election_tp_desc character varying(20) COLLATE pg_catalog."default", contb_aggregate_ytd numeric(14,2), contb_receipt_dt timestamp without time zone, contb_receipt_amt numeric(14,2), receipt_tp character varying(3) COLLATE pg_catalog."default", receipt_tp_desc character varying(90) COLLATE pg_catalog."default", receipt_desc character varying(100) COLLATE pg_catalog."default", memo_cd character varying(1) COLLATE pg_catalog."default", memo_cd_desc character varying(50) COLLATE pg_catalog."default", memo_text character varying(100) COLLATE pg_catalog."default", cand_id character varying(9) COLLATE pg_catalog."default", cand_nm character varying(90) COLLATE pg_catalog."default", cand_nm_first character varying(38) COLLATE pg_catalog."default", cand_m_nm character varying(20) COLLATE pg_catalog."default", cand_nm_last character varying(38) COLLATE pg_catalog."default", cand_prefix character varying(10) COLLATE pg_catalog."default", cand_suffix character varying(10) COLLATE pg_catalog."default", cand_office character varying(1) COLLATE pg_catalog."default", cand_office_desc character varying(20) COLLATE pg_catalog."default", cand_office_st character varying(2) COLLATE pg_catalog."default", cand_office_st_desc character varying(20) COLLATE pg_catalog."default", cand_office_district character varying(2) COLLATE pg_catalog."default", conduit_cmte_id character varying(9) COLLATE pg_catalog."default", conduit_cmte_nm character varying(200) COLLATE pg_catalog."default", conduit_cmte_st1 character varying(34) COLLATE pg_catalog."default", conduit_cmte_st2 character varying(34) COLLATE pg_catalog."default", conduit_cmte_city character varying(30) COLLATE pg_catalog."default", conduit_cmte_st character varying(2) COLLATE pg_catalog."default", conduit_cmte_zip character varying(9) COLLATE pg_catalog."default", donor_cmte_nm character varying(200) COLLATE pg_catalog."default", national_cmte_nonfed_acct character varying(9) COLLATE pg_catalog."default", increased_limit character varying(1) COLLATE pg_catalog."default", action_cd character varying(1) COLLATE pg_catalog."default", action_cd_desc character varying(15) COLLATE pg_catalog."default", tran_id character varying(32) COLLATE pg_catalog."default", back_ref_tran_id character varying(32) COLLATE pg_catalog."default", back_ref_sched_nm character varying(8) COLLATE pg_catalog."default", schedule_type character varying(8) COLLATE pg_catalog."default", schedule_type_desc character varying(90) COLLATE pg_catalog."default", line_num character varying(12) COLLATE pg_catalog."default", image_num character varying(18) COLLATE pg_catalog."default", file_num numeric(7,0), link_id numeric(19,0), orig_sub_id numeric(19,0), sub_id numeric(19,0) NOT NULL, filing_form character varying(8) COLLATE pg_catalog."default" NOT NULL, rpt_tp character varying(3) COLLATE pg_catalog."default", rpt_yr numeric(4,0), two_year_transaction_period numeric(4,0), pdf_url text COLLATE pg_catalog."default", contributor_name_text tsvector, contributor_employer_text tsvector, contributor_occupation_text tsvector, is_individual boolean, clean_contbr_id character varying(9) COLLATE pg_catalog."default", pg_date timestamp without time zone DEFAULT now(), line_number_label text COLLATE pg_catalog."default", cmte_tp character varying(1) COLLATE pg_catalog."default", org_tp character varying(1) COLLATE pg_catalog."default", cmte_dsgn character varying(1) COLLATE pg_catalog."default", CONSTRAINT fec_fitem_sched_a_pkey PRIMARY KEY (sub_id) ) WITH ( OIDS = FALSE ); TABLESPACE pg_default; ============ index and partitions samples=============------------------ -- Table: disclosure.fec_fitem_sched_e no index -------------------========================= sched_b index and partitions samples=============------------------ -- Table: disclosure.fec_fitem_sched_b_2019_2020 -- DROP TABLE disclosure.fec_fitem_sched_b_2019_2020; CREATE TABLE disclosure.fec_fitem_sched_b_2019_2020 ( -- Inherited from table disclosure.fec_fitem_sched_b: cmte_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_cmte_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_l_nm character varying(30) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_f_nm character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_m_nm character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_prefix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_suffix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_employer character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: payee_occupation character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_st1 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_st2 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_city character varying(30) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_st character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_zip character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: disb_desc character varying(100) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: catg_cd character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: catg_cd_desc character varying(40) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: entity_tp character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: entity_tp_desc character varying(50) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: election_tp character varying(5) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: fec_election_tp_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: fec_election_tp_year character varying(4) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: election_tp_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_nm character varying(90) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_nm_first character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_nm_last character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_m_nm character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_prefix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_suffix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_office character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_office_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_office_st character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_office_st_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cand_office_district character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: disb_dt timestamp without time zone, -- Inherited from table disclosure.fec_fitem_sched_b: disb_amt numeric(14,2), -- Inherited from table disclosure.fec_fitem_sched_b: memo_cd character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: memo_cd_desc character varying(50) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: memo_text character varying(100) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: disb_tp character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: disb_tp_desc character varying(90) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: conduit_cmte_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: conduit_cmte_st1 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: conduit_cmte_st2 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: conduit_cmte_city character varying(30) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: conduit_cmte_st character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: conduit_cmte_zip character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: national_cmte_nonfed_acct character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: ref_disp_excess_flg character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: comm_dt timestamp without time zone, -- Inherited from table disclosure.fec_fitem_sched_b: benef_cmte_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: semi_an_bundled_refund numeric(14,2), -- Inherited from table disclosure.fec_fitem_sched_b: action_cd character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: action_cd_desc character varying(15) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: tran_id character varying(32) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: back_ref_tran_id character varying(32) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: back_ref_sched_id character varying(8) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: schedule_type character varying(8) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: schedule_type_desc character varying(90) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: line_num character varying(12) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: image_num character varying(18) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: file_num numeric(7,0), -- Inherited from table disclosure.fec_fitem_sched_b: link_id numeric(19,0), -- Inherited from table disclosure.fec_fitem_sched_b: orig_sub_id numeric(19,0), -- Inherited from table disclosure.fec_fitem_sched_b: sub_id numeric(19,0) NOT NULL, -- Inherited from table disclosure.fec_fitem_sched_b: filing_form character varying(8) COLLATE pg_catalog."default" NOT NULL, -- Inherited from table disclosure.fec_fitem_sched_b: rpt_tp character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: rpt_yr numeric(4,0), -- Inherited from table disclosure.fec_fitem_sched_b: two_year_transaction_period numeric(4,0), -- Inherited from table disclosure.fec_fitem_sched_b: pdf_url text COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: recipient_name_text tsvector, -- Inherited from table disclosure.fec_fitem_sched_b: disbursement_description_text tsvector, -- Inherited from table disclosure.fec_fitem_sched_b: disbursement_purpose_category character varying COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: clean_recipient_cmte_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: pg_date timestamp without time zone DEFAULT now(), -- Inherited from table disclosure.fec_fitem_sched_b: line_number_label text COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cmte_tp character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: org_tp character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_b: cmte_dsgn character varying(1) COLLATE pg_catalog."default", CONSTRAINT fec_fitem_sched_b_2019_2020_pkey PRIMARY KEY (sub_id), CONSTRAINT check_two_year_transaction_period CHECK (two_year_transaction_period = ANY (ARRAY[2019::numeric, 2020::numeric])) ) INHERITS (disclosure.fec_fitem_sched_b) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE disclosure.fec_fitem_sched_b_2019_2020 OWNER to fec; GRANT ALL ON TABLE disclosure.fec_fitem_sched_b_2019_2020 TO fec; GRANT SELECT ON TABLE disclosure.fec_fitem_sched_b_2019_2020 TO fec_read; GRANT SELECT ON TABLE disclosure.fec_fitem_sched_b_2019_2020 TO openfec_read; -- Index: idx_sched_b_2019_2020_cln_rcpt_cmte_id_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cln_rcpt_cmte_id_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cln_rcpt_cmte_id_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (clean_recipient_cmte_id COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cln_rcpt_cmte_id_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cln_rcpt_cmte_id_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cln_rcpt_cmte_id_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (clean_recipient_cmte_id COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_dsgn_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_dsgn_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_dsgn_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_dsgn COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_dsgn_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_dsgn_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_dsgn_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_dsgn COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_id_cmte_tp_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_id_cmte_tp_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_id_cmte_tp_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_id COLLATE pg_catalog."default" DESC NULLS FIRST, cmte_tp COLLATE pg_catalog."default" DESC NULLS FIRST, disb_dt DESC NULLS FIRST, sub_id DESC NULLS FIRST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_id_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_id_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_id_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_id COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_id_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_id_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_id_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_id COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_tp_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_tp_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_tp_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_tp COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_cmte_tp_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_cmte_tp_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_cmte_tp_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (cmte_tp COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_disb_amt_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_disb_amt_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_disb_amt_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (disb_amt ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_disb_desc_text_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_disb_desc_text_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_disb_desc_text_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING gin (disbursement_description_text, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone), sub_id) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_disb_desc_text_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_disb_desc_text_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_disb_desc_text_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING gin (disbursement_description_text, disb_amt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_disb_dt -- DROP INDEX disclosure.idx_sched_b_2019_2020_disb_dt; CREATE INDEX idx_sched_b_2019_2020_disb_dt ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (disb_dt ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (disb_dt DESC NULLS FIRST, sub_id DESC NULLS FIRST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_image_num_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_image_num_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_image_num_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (image_num COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_image_num_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_image_num_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_image_num_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (image_num COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_line_num_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_line_num_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_line_num_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (line_num COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_line_num_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_line_num_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_line_num_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (line_num COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_org_tp_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_org_tp_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_org_tp_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (org_tp COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_org_tp_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_org_tp_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_org_tp_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (org_tp COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rcpt_city_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rcpt_city_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rcpt_city_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (recipient_city COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rcpt_city_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rcpt_city_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rcpt_city_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (recipient_city COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rcpt_name_text_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rcpt_name_text_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rcpt_name_text_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING gin (recipient_name_text, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone), sub_id) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rcpt_name_text_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rcpt_name_text_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rcpt_name_text_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING gin (recipient_name_text, disb_amt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rcpt_st_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rcpt_st_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rcpt_st_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (recipient_st COLLATE pg_catalog."default" ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rcpt_st_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rcpt_st_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rcpt_st_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (recipient_st COLLATE pg_catalog."default" ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rpt_yr_colsc_disb_dt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rpt_yr_colsc_disb_dt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rpt_yr_colsc_disb_dt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (rpt_yr ASC NULLS LAST, COALESCE(disb_dt, '9999-12-31'::date::timestamp without time zone) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_b_2019_2020_rpt_yr_disb_amt_sub_id -- DROP INDEX disclosure.idx_sched_b_2019_2020_rpt_yr_disb_amt_sub_id; CREATE INDEX idx_sched_b_2019_2020_rpt_yr_disb_amt_sub_id ON disclosure.fec_fitem_sched_b_2019_2020 USING btree (rpt_yr ASC NULLS LAST, disb_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Trigger: tri_fec_fitem_sched_b_2019_2020 -- DROP TRIGGER tri_fec_fitem_sched_b_2019_2020 ON disclosure.fec_fitem_sched_b_2019_2020; CREATE TRIGGER tri_fec_fitem_sched_b_2019_2020 BEFORE INSERT ON disclosure.fec_fitem_sched_b_2019_2020 FOR EACH ROW EXECUTE PROCEDURE disclosure.fec_fitem_sched_b_insert(); -------------------========================= sched_a index and partitions samples=============------------------ ---- sched_a partitions samples (2019_2020): -- Table: disclosure.fec_fitem_sched_a_2019_2020 -- DROP TABLE disclosure.fec_fitem_sched_a_2019_2020; CREATE TABLE disclosure.fec_fitem_sched_a_2019_2020 ( -- Inherited from table disclosure.fec_fitem_sched_a: cmte_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cmte_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_nm_first character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_m_nm character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_nm_last character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_prefix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_suffix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_st1 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_st2 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_city character varying(30) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_st character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_zip character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: entity_tp character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: entity_tp_desc character varying(50) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_employer character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contbr_occupation character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: election_tp character varying(5) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: fec_election_tp_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: fec_election_yr character varying(4) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: election_tp_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contb_aggregate_ytd numeric(14,2), -- Inherited from table disclosure.fec_fitem_sched_a: contb_receipt_dt timestamp without time zone, -- Inherited from table disclosure.fec_fitem_sched_a: contb_receipt_amt numeric(14,2), -- Inherited from table disclosure.fec_fitem_sched_a: receipt_tp character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: receipt_tp_desc character varying(90) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: receipt_desc character varying(100) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: memo_cd character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: memo_cd_desc character varying(50) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: memo_text character varying(100) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_nm character varying(90) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_nm_first character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_m_nm character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_nm_last character varying(38) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_prefix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_suffix character varying(10) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_office character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_office_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_office_st character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_office_st_desc character varying(20) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cand_office_district character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_st1 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_st2 character varying(34) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_city character varying(30) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_st character varying(2) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: conduit_cmte_zip character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: donor_cmte_nm character varying(200) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: national_cmte_nonfed_acct character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: increased_limit character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: action_cd character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: action_cd_desc character varying(15) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: tran_id character varying(32) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: back_ref_tran_id character varying(32) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: back_ref_sched_nm character varying(8) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: schedule_type character varying(8) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: schedule_type_desc character varying(90) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: line_num character varying(12) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: image_num character varying(18) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: file_num numeric(7,0), -- Inherited from table disclosure.fec_fitem_sched_a: link_id numeric(19,0), -- Inherited from table disclosure.fec_fitem_sched_a: orig_sub_id numeric(19,0), -- Inherited from table disclosure.fec_fitem_sched_a: sub_id numeric(19,0) NOT NULL, -- Inherited from table disclosure.fec_fitem_sched_a: filing_form character varying(8) COLLATE pg_catalog."default" NOT NULL, -- Inherited from table disclosure.fec_fitem_sched_a: rpt_tp character varying(3) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: rpt_yr numeric(4,0), -- Inherited from table disclosure.fec_fitem_sched_a: two_year_transaction_period numeric(4,0), -- Inherited from table disclosure.fec_fitem_sched_a: pdf_url text COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: contributor_name_text tsvector, -- Inherited from table disclosure.fec_fitem_sched_a: contributor_employer_text tsvector, -- Inherited from table disclosure.fec_fitem_sched_a: contributor_occupation_text tsvector, -- Inherited from table disclosure.fec_fitem_sched_a: is_individual boolean, -- Inherited from table disclosure.fec_fitem_sched_a: clean_contbr_id character varying(9) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: pg_date timestamp without time zone DEFAULT now(), -- Inherited from table disclosure.fec_fitem_sched_a: line_number_label text COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cmte_tp character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: org_tp character varying(1) COLLATE pg_catalog."default", -- Inherited from table disclosure.fec_fitem_sched_a: cmte_dsgn character varying(1) COLLATE pg_catalog."default", CONSTRAINT fec_fitem_sched_a_2019_2020_pkey PRIMARY KEY (sub_id), CONSTRAINT check_two_year_transaction_period CHECK (two_year_transaction_period = ANY (ARRAY[2019::numeric, 2020::numeric])) ) INHERITS (disclosure.fec_fitem_sched_a) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE disclosure.fec_fitem_sched_a_2019_2020 OWNER to fec; -- Index: idx_sched_a_2019_2020_amt_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_amt_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_amt_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (contb_receipt_amt ASC NULLS LAST, contb_receipt_dt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_clean_contbr_id_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_clean_contbr_id_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_clean_contbr_id_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (clean_contbr_id COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_clean_contbr_id_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_clean_contbr_id_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_clean_contbr_id_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (clean_contbr_id COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_dt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_cmte_dsgn_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_cmte_dsgn_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_cmte_dsgn_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (cmte_dsgn COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_cmte_dsgn_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_cmte_dsgn_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_cmte_dsgn_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (cmte_dsgn COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_dt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_cmte_id_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_cmte_id_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_cmte_id_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (cmte_id COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_cmte_id_dt_sub_id_desc -- DROP INDEX disclosure.idx_sched_a_2019_2020_cmte_id_dt_sub_id_desc; CREATE INDEX idx_sched_a_2019_2020_cmte_id_dt_sub_id_desc ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (cmte_id COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_dt DESC NULLS LAST, sub_id DESC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_cmte_tp_colsc_rcpt_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_cmte_tp_colsc_rcpt_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_cmte_tp_colsc_rcpt_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (cmte_tp COLLATE pg_catalog."default" ASC NULLS LAST, (COALESCE(contb_receipt_dt, '9999-12-31'::date::timestamp without time zone)) ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_cmte_tp_rcpt_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_cmte_tp_rcpt_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_cmte_tp_rcpt_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (cmte_tp COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contbr_city_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contbr_city_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contbr_city_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (contbr_city COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contbr_city_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contbr_city_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contbr_city_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (contbr_city COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_dt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contbr_city_jk -- DROP INDEX disclosure.idx_sched_a_2019_2020_contbr_city_jk; CREATE INDEX idx_sched_a_2019_2020_contbr_city_jk ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (upper(contbr_city::text) COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contbr_st_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contbr_st_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contbr_st_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (contbr_st COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contbr_st_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contbr_st_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contbr_st_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (contbr_st COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_dt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contbr_zip -- DROP INDEX disclosure.idx_sched_a_2019_2020_contbr_zip; CREATE INDEX idx_sched_a_2019_2020_contbr_zip ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contbr_zip COLLATE pg_catalog."default" gin_trgm_ops) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contrib_emp_text_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contrib_emp_text_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contrib_emp_text_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contributor_employer_text, contb_receipt_amt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contrib_emp_text_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contrib_emp_text_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contrib_emp_text_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contributor_employer_text, contb_receipt_dt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contrib_name_text_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contrib_name_text_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contrib_name_text_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contributor_name_text, contb_receipt_amt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contrib_name_text_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contrib_name_text_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contrib_name_text_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contributor_name_text, contb_receipt_dt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contrib_occ_text_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contrib_occ_text_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contrib_occ_text_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contributor_occupation_text, contb_receipt_amt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_contrib_occ_text_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_contrib_occ_text_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_contrib_occ_text_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING gin (contributor_occupation_text, contb_receipt_dt, sub_id) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_dt_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_dt_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_dt_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (contb_receipt_dt ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_entity_tp -- DROP INDEX disclosure.idx_sched_a_2019_2020_entity_tp; CREATE INDEX idx_sched_a_2019_2020_entity_tp ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (entity_tp COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_image_num_amt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_image_num_amt_sub_id; CREATE INDEX idx_sched_a_2019_2020_image_num_amt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (image_num COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_amt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_image_num_dt_sub_id -- DROP INDEX disclosure.idx_sched_a_2019_2020_image_num_dt_sub_id; CREATE INDEX idx_sched_a_2019_2020_image_num_dt_sub_id ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (image_num COLLATE pg_catalog."default" ASC NULLS LAST, contb_receipt_dt ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default; -- Index: idx_sched_a_2019_2020_is_individual_contbr_city_state -- DROP INDEX disclosure.idx_sched_a_2019_2020_is_individual_contbr_city_state; CREATE INDEX idx_sched_a_2019_2020_is_individual_contbr_city_state ON disclosure.fec_fitem_sched_a_2019_2020 USING btree (is_individual ASC NULLS LAST, contbr_city COLLATE pg_catalog."default" ASC NULLS LAST, contbr_st COLLATE pg_catalog."default" ASC NULLS LAST, sub_id ASC NULLS LAST) TABLESPACE pg_default;