0

私のテーブル構造:

CREATE TABLE `goal_review` (
    `id` BIGINT(25) NOT NULL AUTO_INCREMENT,
    `user_review_info` BIGINT(25) UNSIGNED NOT NULL DEFAULT '0',
    `SKILL_COMPETENCY_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_OBJECTIVE` LONGTEXT NULL,
    `SKILL_COMPETENCY_CONDITION` LONGTEXT NULL,
    `SKILL_COMPETENCY_MEASURE` LONGTEXT NULL,
    `SKILL_COMPETENCY_TIMING` LONGTEXT NULL,
    `SKILL_COMPETENCY_TYPE` LONGTEXT NULL,
    `SKILL_COMPETENCY_WEIGHTAGE` LONGTEXT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `SKILL_COMPETENCY_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `SKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_OBJECTIVE` LONGTEXT NULL,
    `PROJECT_DELIVERY_CONDITION` LONGTEXT NULL,
    `PROJECT_DELIVERY_MEASURE` LONGTEXT NULL,
    `PROJECT_DELIVERY_TIMING` LONGTEXT NULL,
    `PROJECT_DELIVERY_TYPE` LONGTEXT NULL,
    `PROJECT_DELIVERY_WEIGHTAGE` LONGTEXT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `BUSINESS_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `BUSINESS_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `BUSINESS_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `BUSINESS_OBJECTIVE` LONGTEXT NULL,
    `BUSINESS_CONDITION` LONGTEXT NULL,
    `BUSINESS_MEASURE` LONGTEXT NULL,
    `BUSINESS_TIMING` LONGTEXT NULL,
    `BUSINESS_TYPE` LONGTEXT NULL,
    `BUSINESS_WEIGHTAGE` LONGTEXT NULL,
    `BUSINESS_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_OBJECTIVE` LONGTEXT NULL,
    `COMPLIANCE_CONDITION` LONGTEXT NULL,
    `COMPLIANCE_MEASURE` LONGTEXT NULL,
    `COMPLIANCE_TIMING` LONGTEXT NULL,
    `COMPLIANCE_TYPE` LONGTEXT NULL,
    `COMPLIANCE_WEIGHTAGE` LONGTEXT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_OBJECTIVE` LONGTEXT NULL,
    `LONG_TERM_CONDITION` LONGTEXT NULL,
    `LONG_TERM_MEASURE` LONGTEXT NULL,
    `LONG_TERM_TIMING` LONGTEXT NULL,
    `LONG_TERM_TYPE` LONGTEXT NULL,
    `LONG_TERM_WEIGHTAGE` LONGTEXT NULL,
    `LONG_TERM_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    INDEX `FK_goal_review_user_review_info` (`user_review_info`),
    INDEX `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING` (`SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRSKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING` (`SKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING` (`SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRSKILL_COMPETENCY_MID_REVIEW_SELF_RATING` (`SKILL_COMPETENCY_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING` (`PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING` (`PROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING` (`PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_MID_REVIEW_SELF_RATING` (`PROJECT_DELIVERY_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRBUSINESS_ANNUAL_REVIEW_MANAGER_RATING` (`BUSINESS_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRBUSINESS_MID_REVIEW_MANAGER_RATING` (`BUSINESS_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRBUSINESS_ANNUAL_REVIEW_SELF_RATING` (`BUSINESS_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRBUSINESS_MID_REVIEW_SELF_RATING` (`BUSINESS_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRCOMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING` (`COMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRCOMPLIANCE_MID_REVIEW_MANAGER_RATING` (`COMPLIANCE_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRCOMPLIANCE_ANNUAL_REVIEW_SELF_RATING` (`COMPLIANCE_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRCOMPLIANCE_MID_REVIEW_SELF_RATING` (`COMPLIANCE_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRLONG_TERM_ANNUAL_REVIEW_MANAGER_RATING` (`LONG_TERM_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRLONG_TERM_MID_REVIEW_MANAGER_RATING` (`LONG_TERM_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRLONG_TERM_ANNUAL_REVIEW_SELF_RATING` (`LONG_TERM_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRLONG_TERM_MID_REVIEW_SELF_RATING` (`LONG_TERM_MID_REVIEW_SELF_RATING`),
    CONSTRAINT `FK_GRLONG_TERM_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`LONG_TERM_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRLONG_TERM_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`LONG_TERM_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRLONG_TERM_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`LONG_TERM_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRLONG_TERM_MID_REVIEW_SELF_RATING` FOREIGN KEY (`LONG_TERM_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_goal_review_user_review_info` FOREIGN KEY (`user_review_info`) REFERENCES `user_review_info` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`BUSINESS_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`BUSINESS_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`BUSINESS_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_MID_REVIEW_SELF_RATING` FOREIGN KEY (`BUSINESS_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`COMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`COMPLIANCE_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`COMPLIANCE_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_MID_REVIEW_SELF_RATING` FOREIGN KEY (`COMPLIANCE_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`PROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_MID_REVIEW_SELF_RATING` FOREIGN KEY (`PROJECT_DELIVERY_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`SKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_MID_REVIEW_SELF_RATING` FOREIGN KEY (`SKILL_COMPETENCY_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;

最小限のデータを挿入できますが、LONGTEXTフィールドに 500 文字も挿入できません。

の代わりにBLOBsを試しました。TEXTLONG TEXT

4

3 に答える 3

0

こんにちは友達、間違いは私です。mysql は、各列のファイルにロングテキストまたはテキストを書き込む必要があります。このファイル情報は、テーブルにのみ格納されます。このファイルには、入力によって生成された一意の名前が必要です。すべての列に同じ入力を入力しようとしています。そのため、mysqlエンジンは入力からそのインデックスを取得するのに時間がかかりすぎます(一意のファイル名の場合)。そのため、65,535バイトを超える行サイズが必要になります。エラーなしでmysqlエンジンによって取得された別の入力を入力しようとしました。
私の考えが間違っている場合は、迅速な返信のためにJeevan Patilにもう一度答えてください。

于 2013-03-15T05:08:54.767 に答える
0

Blob はデータをバイナリ形式で格納するために使用され、TEXT は大きな文字列を格納します。

BLOB 値はバイナリ文字列として扱われます。これらには文字セットがなく、並べ替えと比較は列値のバイトの数値に基づいています。

TEXT 値は非バイナリ文字列 (文字列) として扱われます。それらには文字セットがあり、値は文字セットの照合に基づいてソートおよび比較されます。

テキスト形式のメッセージは、ほとんどの場合、TEXT として保存する必要があります。

于 2013-03-13T07:33:47.213 に答える