Difference between revisions of "Indexed Images"
(Created page with "Every day at midnight during site maintenance we generate a cached table of character + indexed images. INSERT INTO characters_a SELECT 0,0,characters.*,mt,date,RAND() FROM...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Every day at midnight during site maintenance we generate a cached table of character + indexed images. | Every day at midnight during site maintenance we generate a cached table of character + indexed images. | ||
+ | |||
+ | DROP TABLE characters_a; | ||
+ | CREATE TABLE `characters_a` ( | ||
+ | `zid` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `imgid` int(11) NOT NULL, | ||
+ | `id` int(11) NOT NULL, | ||
+ | `eye_color` tinyint(3) unsigned NOT NULL, | ||
+ | `hair_color` tinyint(3) unsigned NOT NULL, | ||
+ | `age` tinyint(3) unsigned NOT NULL, | ||
+ | `sex` tinyint(3) unsigned NOT NULL, | ||
+ | `hair_length` tinyint(3) unsigned NOT NULL, | ||
+ | `mimikko` tinyint(3) unsigned NOT NULL, | ||
+ | `r_eye_color` tinyint(4) NOT NULL, | ||
+ | `r_hair_color` tinyint(4) NOT NULL, | ||
+ | `r_age` tinyint(4) NOT NULL, | ||
+ | `r_sex` tinyint(4) NOT NULL, | ||
+ | `r_hair_length` tinyint(4) NOT NULL, | ||
+ | `r_mimikko` tinyint(4) NOT NULL, | ||
+ | `pagerank` int(11) NOT NULL, | ||
+ | `image` varchar(256) NOT NULL, | ||
+ | `romji` varchar(256) NOT NULL, | ||
+ | `japanese` varchar(256) NOT NULL, | ||
+ | `publisher` int(10) unsigned NOT NULL, | ||
+ | `thumb` varchar(256) NOT NULL, | ||
+ | `chinese` varchar(256) NOT NULL, | ||
+ | `CV` varchar(256) NOT NULL, | ||
+ | `clothing` tinyint(3) unsigned NOT NULL, | ||
+ | `lightdark` tinyint(3) unsigned NOT NULL, | ||
+ | `pid2` int(10) unsigned NOT NULL, | ||
+ | `clonetype` int(10) unsigned NOT NULL, | ||
+ | `otherchar` int(10) unsigned NOT NULL, | ||
+ | `viewed` int(10) unsigned NOT NULL, | ||
+ | `today` int(10) unsigned NOT NULL, | ||
+ | `furigana` varchar(256) NOT NULL, | ||
+ | `yesterday` int(10) unsigned NOT NULL, | ||
+ | `author` int(10) unsigned NOT NULL, | ||
+ | `clone` int(10) unsigned NOT NULL, | ||
+ | `role` tinyint(3) unsigned NOT NULL, | ||
+ | `date_created` int(10) unsigned NOT NULL, | ||
+ | `date_modified` int(10) unsigned NOT NULL, | ||
+ | `refs` int(10) unsigned NOT NULL, | ||
+ | `esbr` tinyint(4) NOT NULL, | ||
+ | mt tinyint unsigned NOT NULL, | ||
+ | date varchar(32) NOT NULL, | ||
+ | `random` float NOT NULL, | ||
+ | PRIMARY KEY (`zid`), | ||
+ | KEY `id` (`id`), | ||
+ | KEY `mt` (`mt`), | ||
+ | KEY `b4` (`eye_color`), | ||
+ | KEY `b5` (`hair_color`), | ||
+ | KEY `b7` (`hair_length`), | ||
+ | KEY `characters_pagerank_index` (`pagerank`), | ||
+ | KEY `index_sex_age_haircolor_eyecolor` (`sex`,`age`,`hair_color`,`eye_color`), | ||
+ | KEY `pub` (`publisher`), | ||
+ | KEY `author` (`author`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
+ | |||
INSERT INTO characters_a | INSERT INTO characters_a |
Latest revision as of 02:02, 25 December 2024
Every day at midnight during site maintenance we generate a cached table of character + indexed images.
DROP TABLE characters_a; CREATE TABLE `characters_a` ( `zid` int(11) NOT NULL AUTO_INCREMENT, `imgid` int(11) NOT NULL, `id` int(11) NOT NULL, `eye_color` tinyint(3) unsigned NOT NULL, `hair_color` tinyint(3) unsigned NOT NULL, `age` tinyint(3) unsigned NOT NULL, `sex` tinyint(3) unsigned NOT NULL, `hair_length` tinyint(3) unsigned NOT NULL, `mimikko` tinyint(3) unsigned NOT NULL, `r_eye_color` tinyint(4) NOT NULL, `r_hair_color` tinyint(4) NOT NULL, `r_age` tinyint(4) NOT NULL, `r_sex` tinyint(4) NOT NULL, `r_hair_length` tinyint(4) NOT NULL, `r_mimikko` tinyint(4) NOT NULL, `pagerank` int(11) NOT NULL, `image` varchar(256) NOT NULL, `romji` varchar(256) NOT NULL, `japanese` varchar(256) NOT NULL, `publisher` int(10) unsigned NOT NULL, `thumb` varchar(256) NOT NULL, `chinese` varchar(256) NOT NULL, `CV` varchar(256) NOT NULL, `clothing` tinyint(3) unsigned NOT NULL, `lightdark` tinyint(3) unsigned NOT NULL, `pid2` int(10) unsigned NOT NULL, `clonetype` int(10) unsigned NOT NULL, `otherchar` int(10) unsigned NOT NULL, `viewed` int(10) unsigned NOT NULL, `today` int(10) unsigned NOT NULL, `furigana` varchar(256) NOT NULL, `yesterday` int(10) unsigned NOT NULL, `author` int(10) unsigned NOT NULL, `clone` int(10) unsigned NOT NULL, `role` tinyint(3) unsigned NOT NULL, `date_created` int(10) unsigned NOT NULL, `date_modified` int(10) unsigned NOT NULL, `refs` int(10) unsigned NOT NULL, `esbr` tinyint(4) NOT NULL, mt tinyint unsigned NOT NULL, date varchar(32) NOT NULL, `random` float NOT NULL, PRIMARY KEY (`zid`), KEY `id` (`id`), KEY `mt` (`mt`), KEY `b4` (`eye_color`), KEY `b5` (`hair_color`), KEY `b7` (`hair_length`), KEY `characters_pagerank_index` (`pagerank`), KEY `index_sex_age_haircolor_eyecolor` (`sex`,`age`,`hair_color`,`eye_color`), KEY `pub` (`publisher`), KEY `author` (`author`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO characters_a SELECT 0,0,characters.*,mt,date,RAND() FROM characters INNER JOIN publishers ON characters.publisher = publishers.id; INSERT INTO characters_a SELECT 0,characters_supplicant.*,mt,date,RAND() FROM characters_supplicant INNER JOIN publishers ON characters_supplicant.publisher = publishers.id;
The indexed images may have the same name and appear as duplicates where this table is used unfiltered.
https://www.animecharactersdatabase.com/characters_supplicant.php
List of pages using character_a table:
bash-5.1$ grep -il characters_a *php OLD-sort-characters.php ajax_titlecharacters.php animationdemo.php birthdays.php birthdays_sitemap.php bs.php c_chart.php c_latest.php c_newCharactersPageViewCounter.php c_va.php character_tags.php characters.php characters_supplicant.php characters_supplicant_post.php characterswith.php dropdown.php g_smashorpass.php groupcosplay.php guessthecharacter.php idlegame.php idlegame_post.php iframecharacters.php index.php kanjilookup.php my_watch.php myseriesva.php newCharactersPageViewCounter.php newsearchpanel.php noprotag.php notagsr.php nova.php novatitle.php popularity.php protagquotes.php reindex.php search2.php searchall.php sm_birthdays.php smashorpass.php smashorpassaudio.php sort_characters.php sort_series.php test-characterswith.php test-newtop.php title_tags.php topvas.php vacheck.php whois.php
bash-5.1$ grep -il characters_a *inc
OLD-main.inc
beta_top.inc
bs_year_trivia.inc
index_member.inc
index_visitor.inc
main-full.inc
main.inc
rei-main.inc
sort_characters.inc
ux_search.inc
va.inc