-- INDEXING PATSTAT
--
--
-- Database: `patstat`
--
-- BY JULIO RAFFO (EPFL/CEMI)
--
-- (to be execute after 'new columns')
-- --------------------------------------------------------

--
-- Indexes for table `tls201_appln`
-- ok

CREATE index i201_auth on patstat.tls201_appln (appln_auth);
CREATE index i201_nr on patstat.tls201_appln (appln_nr);
CREATE index i201_kind on patstat.tls201_appln (appln_kind);
CREATE index i201_year on patstat.tls201_appln (appln_filing_year);
CREATE index i201_internat on patstat.tls201_appln (internat_appln_id);


-- --------------------------------------------------------

--
-- Indexes for table `tls203_appln_abstr`
-- ok

CREATE index i203_id on patstat.tls203_appln_abstr (appln_id);

-- --------------------------------------------------------

--
-- Indexes for table `tls204_appln_prior`
-- ok

CREATE index i204_seq_nr on patstat.tls204_appln_prior (PRIOR_APPLN_SEQ_NR);
CREATE index i204_priot_appln on patstat.tls204_appln_prior (PRIOR_APPLN_ID, APPLN_ID);


-- --------------------------------------------------------

--
-- Indexes for table `tls206_person`
-- ok

CREATE index i206_ctry on patstat.tls206_person (person_ctry_code(2));
CREATE index i206_stdname on patstat.tls206_person (doc_std_name_id);
CREATE index i206_name on patstat.tls206_person (person_name(50));
CREATE index i206_address on patstat.tls206_person (person_address(100));

CREATE index i206_ctry_id on patstat.tls206_person (person_ctry_code(2), person_id);


-- --------------------------------------------------------

--
-- Indexes for table `tls207_pers_appln`
-- ok

CREATE index i207_applt on patstat.tls207_pers_appln (applt_seq_nr);
CREATE index i207_invt on patstat.tls207_pers_appln (invt_seq_nr);
CREATE index i207_pers_appln on patstat.tls207_pers_appln (person_id, appln_id);
CREATE index i207_appln_pers  on patstat.tls207_pers_appln (appln_id, person_id);


-- --------------------------------------------------------

--
-- Indexes for table `tls208_doc_std_nms`
-- ok

CREATE index i208_id on patstat.tls208_doc_std_nms (doc_std_name_id);
CREATE index i208_name on patstat.tls208_doc_std_nms (doc_std_name(30));

-- --------------------------------------------------------

--
-- Indexes for table `tls209_appln_ipc`
-- ok

CREATE index i209_id on patstat.tls209_appln_ipc (appln_id);
CREATE index i209_ipc on patstat.tls209_appln_ipc (ipc_class_symbol(15));

-- --------------------------------------------------------

--
-- Indexes for table `tls210_appln_n_cls`
-- ok

CREATE index i210_id on patstat.tls210_appln_n_cls (appln_id);
CREATE index i210_nat on patstat.tls210_appln_n_cls (nat_class_symbol(15));

-- --------------------------------------------------------

--
-- Indexes for table `tls211_pat_publn`
-- ok

CREATE index i211_publn_id on patstat.tls211_pat_publn (pat_publn_id);
CREATE index i211_auth on patstat.tls211_pat_publn (publn_auth(2));
CREATE index i211_nr on patstat.tls211_pat_publn (publn_nr);
CREATE index i211_kind on patstat.tls211_pat_publn (publn_kind(2));
CREATE index i211_appln_id on patstat.tls211_pat_publn (appln_id);
CREATE index i211_year on patstat.tls211_pat_publn (publn_year);
CREATE index i211_lg on patstat.tls211_pat_publn (publn_lg(2));

-- --------------------------------------------------------

--
-- Indexes for table `tls212_citation`
-- ok

CREATE index i212_publn_id on patstat.tls212_citation (pat_publn_id);
CREATE index i212_citn_id on patstat.tls212_citation (citn_id);
CREATE index i212_cited_id on patstat.tls212_citation (cited_pat_publn_id);
CREATE index i212_npl_id on patstat.tls212_citation (npl_publn_id);
CREATE index i212_pat_seq_nr on patstat.tls212_citation (pat_citn_seq_nr);
CREATE index i212_npl_seq_nr on patstat.tls212_citation (npl_citn_seq_nr);
CREATE index i212_origin on patstat.tls212_citation (citn_origin);

-- --------------------------------------------------------

--
-- Indexes for table `tls214_npl_publn`
-- ok

CREATE index i214_id on patstat.tls214_npl_publn (npl_publn_id);

-- --------------------------------------------------------

--
-- Indexes for table `tls215_citn_categ`
-- ok

CREATE index i215_publn_id on patstat.tls215_citn_categ (pat_publn_id);
CREATE index i215_citn_id on patstat.tls215_citn_categ (citn_id);
CREATE index i215_categ on patstat.tls215_citn_categ (citn_categ(1));

-- --------------------------------------------------------

--
-- Indexes for table `tls216_appln_contn`
-- ok

CREATE index i216_id on patstat.tls216_appln_contn (APPLN_ID);
CREATE index i216_parent on patstat.tls216_appln_contn (PARENT_APPLN_ID);
CREATE index i216_type on patstat.tls216_appln_contn (CONTN_TYPE(3));