SHOW:
|
|
- or go back to the newest paste.
| 1 | query: | |
| 2 | SELECT count(status), status from ourtable group by status ORDER BY status; | |
| 3 | ||
| 4 | +-------------+-----------------------------+----------------------------------- | |
| 5 | | Column | Type | Modifiers | |
| 6 | |-------------+-----------------------------+----------------------------------- | |
| 7 | | id | integer | not null default nextval('ourtable_id_seq'::regclass) |
| |
| 8 | | uname | text | not null | |
| 9 | | essays | text | | |
| 10 | - | | last_parsed | timestamp without time zone | |
| 10 | + | |
| 11 | | details | text | | |
| 12 | | status | character(1) | not null default 'q'::bpchar | |
| 13 | | qstatus | character(1) | not null default 'q'::bpchar | |
| 14 | | media_wc | integer | not null default 0 | |
| 15 | +-------------+-----------------------------+----------------------------------- | |
| 16 | Indexes: | |
| 17 | - | "last_parsed_idx" btree (last_parsed) |
| 17 | + | |
| 18 | "ourtable_uname_key" UNIQUE CONSTRAINT, btree (uname) | |
| 19 | - | "status_idx" btree (status) |
| 19 | + | |
| 20 | "status_idx" btree (status) | |
| 21 | ||
| 22 | +---------+----------+ | |
| 23 | | count | status | | |
| 24 | |---------+----------| | |
| 25 | | 1480553 | d | | |
| 26 | | 458 | p | | |
| 27 | | 4331 | q | | |
| 28 | | 6347131 | s | | |
| 29 | +---------+----------+ | |
| 30 | ||
| 31 | POSTGRES VERSION 9.3.9 | |
| 32 | POSTGRES SETTINGS: | |
| 33 | shared_buffers = 3GB | |
| 34 | maintenance_work_mem = 256MB | |
| 35 | work_mem = 256MB | |
| 36 | ||
| 37 | ||
| 38 | Ran VACUUM ANALYZE to no avail. | |
| 39 | Takes 15 seconds. | |
| 40 | ||
| 41 | MySQL with default settings takes a fraction of a second after reboot. |