sql - mysql incorrect key file for table -
i have following table named posts
column type null default comments postid bigint(20) no 0 source varchar(10) no profanity tinyint(1) no 0 postcreated bigint(15) yes null postmessage varchar(255) yes null possibleduplicate varchar(255) yes null used checking duplicate messages posturl varchar(255) yes null posttype varchar(10) no posttag tinyint(11) no 0 media varchar(255) yes null first result of coalesce media1-4 media1 varchar(255) yes null media2 varchar(255) yes null media3 varchar(255) yes null media4 varchar(255) yes null latitude varchar(255) yes null longitude varchar(255) yes null userid bigint(20) yes null username varchar(255) yes null userfullname varchar(255) yes null userprofilepicture varchar(255) yes null
it has following indexes
:
keyname type unique packed column cardinality collation null comment primary btree yes no postid 355837 no posttag 355837 no postcreated btree no no postcreated 355837 yes posttagindex btree no no posttag 16 no postcreated 355837 yes profanity 355837 no source btree no no source 139 no posttag 265 no filters btree no no posttag 16 no used when filtering results profanity 16 no postmessage 355837 yes postcreated 355837 yes
when run query:
select * `posts` ( `posttag` = 24 , `profanity` != 0 ) , ( ( `source` = "instagram" , substring(`postmessage`, 1, 4) != 'rt @' , `profanity` = - 1 ) or ( `source` = "twitter" , substring(`postmessage`, 1, 4) != 'rt @' , `profanity` = - 1 ) ) order `postcreated` desc limit 0, 25
everything fine, when run query:
select * `posts` ( `posttag` = 24 , `profanity` != 0 ) , ( ( `source` = "instagram" , substring(`postmessage`, 1, 4) != 'rt @' , `profanity` = - 1 ) or ( `source` = "twitter" , substring(`postmessage`, 1, 4) != 'rt @' , `profanity` = - 1 ) ) group `possibleduplicate` order `postcreated` desc limit 0, 25
i following error:
[err] 126 - incorrect key file table '/tmp/#sql_6e6_0.myi'; try repair it
it happens when add group possibleduplicate
query. possibleduplicate
text, it's empty. table has around 358399 rows @ moment. can me fix this.
Comments
Post a Comment