-
-
Save dbolser-ebi/6613cbc375c773f95543 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS temp_individual_genotype_a; | |
Query OK, 0 rows affected (0.02 sec) | |
CREATE TABLE temp_individual_genotype_a | |
-> (INDEX pk_ish (variation_id, population_id, allele_code_id)) | |
-> SELECT | |
-> variation_id, population_id, allele_code_id_1 AS allele_code_id, | |
-> `COUNT(*)` AS N | |
-> FROM temp_individual_genotype_a1 LIMIT 6000000; | |
Query OK, 6000000 rows affected, 1 warning (6.08 sec) | |
Records: 6000000 Duplicates: 0 Warnings: 1 | |
INSERT INTO temp_individual_genotype_a | |
-> SELECT | |
-> variation_id, population_id, allele_code_id_2 AS allele_code_id, | |
-> `COUNT(*)` AS N | |
-> FROM temp_individual_genotype_a2 LIMIT 6000000; | |
Query OK, 6000000 rows affected, 1 warning (20.63 sec) | |
Records: 6000000 Duplicates: 0 Warnings: 1 | |
OPTIMIZE TABLE temp_individual_genotype_a; | |
+---------------------------------------------------------------------+----------+----------+----------+ | |
| Table | Op | Msg_type | Msg_text | | |
+---------------------------------------------------------------------+----------+----------+----------+ | |
| solanum_lycopersicum_variation_26_79_240.temp_individual_genotype_a | optimize | status | OK | | |
+---------------------------------------------------------------------+----------+----------+----------+ | |
1 row in set (2.96 sec) | |
EXPLAIN | |
-> SELECT *, COUNT(*), SUM(N) FROM temp_individual_genotype_a GROUP BY variation_id, population_id, allele_code_id; | |
+----+-------------+----------------------------+------+---------------+------+---------+------+----------+---------------------------------+ | |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | | |
+----+-------------+----------------------------+------+---------------+------+---------+------+----------+---------------------------------+ | |
| 1 | SIMPLE | temp_individual_genotype_a | ALL | NULL | NULL | NULL | NULL | 12000000 | Using temporary; Using filesort | | |
+----+-------------+----------------------------+------+---------------+------+---------+------+----------+---------------------------------+ | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment