--CREATE EXTENSION pg_trgm;
--create INDEX t_article_articlename_gist_index on t_article using gist (lower(articlename) gist_trgm_ops); 
--create INDEX t_article_author_gist_index on t_article using gist (lower(author) gist_trgm_ops); 
CREATE INDEX t_article_articlename_index  ON t_article (articlename);
CREATE INDEX t_article_pinyin_index  ON t_article (pinyin);
CREATE INDEX t_article_author_index  ON t_article (author);
CREATE INDEX t_article_category_idx  ON t_article (category);
CREATE INDEX t_article_category_lastupdate_lastchapterno_deleteflag_idx  ON t_article (category, lastupdate, lastchapterno, deleteflag );
CREATE INDEX t_article_lastupdate_index ON t_article  (lastupdate);
CREATE INDEX t_article_allvisit_index ON t_article  (allvisit);
CREATE INDEX t_article_allvote_index ON t_article  (allvote);
CREATE INDEX t_article_monthvisit_index ON t_article  (monthvisit);
CREATE INDEX t_article_weekvote_index ON t_article  (weekvote);
CREATE INDEX t_article_dayvisit_index ON t_article  (dayvisit);
CREATE INDEX t_article_dayvote_index ON t_article  (dayvote);
CREATE INDEX t_article_postdate_index ON t_article  (postdate);
CREATE INDEX t_article_size_index ON t_article  (size);
CREATE INDEX t_chapter_articleno_index  ON t_chapter (articleno);
CREATE INDEX t_chapter_articleno_chapterno_deleteflag_chaptertype_index on t_chapter (articleno,chapterno,deleteflag,chaptertype);
CREATE INDEX t_chapter_chaptername_index  ON t_chapter (chaptername);
CREATE INDEX t_credithistory_userno_index ON t_credit_history (userno);
CREATE INDEX t_review_articleno ON t_review (articleno);
CREATE INDEX t_user_openid_deleteflag_index ON t_user (openid,deleteflag);
CREATE INDEX t_user_loginid_password_deleteflag_index ON t_user (loginid,password,deleteflag);