All pastes #979671 Raw Edit

Something

public sql v1 · immutable
·published 2008-04-10 14:52 UTC
rendered paste body
mysql> explain postings;+----------------+--------------+------+-----+---------+----------------+| Field          | Type         | Null | Key | Default | Extra          |+----------------+--------------+------+-----+---------+----------------+| id             | int(11)      | NO   | PRI | NULL    | auto_increment | | title          | varchar(254) | YES  |     | NULL    |                | | trade_id       | int(11)      | YES  | MUL | NULL    |                | | body           | text         | YES  |     | NULL    |                | | votes          | int(11)      | YES  |     | 0       |                | | created_at     | datetime     | YES  |     | NULL    |                | | updated_at     | datetime     | YES  |     | NULL    |                | | member_id      | int(11)      | YES  | MUL | NULL    |                | | type           | varchar(255) | YES  |     | NULL    |                | | topic_id       | int(11)      | YES  | MUL | NULL    |                | | equity_id      | int(11)      | YES  | MUL | NULL    |                | | ip_address     | varchar(255) | YES  |     | NULL    |                | | hidden_at      | datetime     | YES  |     | NULL    |                | | view_count     | int(11)      | YES  |     | 0       |                | | comments_count | int(11)      | YES  |     | 0       |                | | import_guid    | varchar(255) | YES  |     | NULL    |                | | updated_by     | int(11)      | YES  |     | NULL    |                | | version        | int(11)      | YES  |     | NULL    |                | +----------------+--------------+------+-----+---------+----------------+18 rows in set (0.00 sec)mysql> show indexes from postings;+----------+------------+-----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+| Table    | Non_unique | Key_name                    | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |+----------+------------+-----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+| postings |          0 | PRIMARY                     |            1 | id          | A         |       10297 |     NULL | NULL   |      | BTREE      |         | | postings |          1 | index_postings_on_member_id |            1 | member_id   | A         |        1716 |     NULL | NULL   | YES  | BTREE      |         | | postings |          1 | index_postings_on_trade_id  |            1 | trade_id    | A         |          52 |     NULL | NULL   | YES  | BTREE      |         | | postings |          1 | index_postings_on_topic_id  |            1 | topic_id    | A         |         858 |     NULL | NULL   | YES  | BTREE      |         | | postings |          1 | index_postings_on_equity_id |            1 | equity_id   | A         |        2574 |     NULL | NULL   | YES  | BTREE      |         | +----------+------------+-----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+5 rows in set (0.15 sec)mysql>