Closed
Bug 916279
Opened 11 years ago
Closed 11 years ago
Add indexes to raw_crashes to support cron_submitter.sh query
Categories
(Socorro :: Database, task)
Tracking
(Not tracked)
RESOLVED
FIXED
59
People
(Reporter: selenamarie, Assigned: selenamarie)
Details
(Whiteboard: [qa-][DB Changes])
I added a sweet new index to raw_crashes to support a post-rabbitmq deployment query for shipping crashes between prod->stage->dev. This ticket documents that change, which is just in the database, rather than in any code.
Assignee | ||
Comment 1•11 years ago
|
||
Code to add the indexes to the existing tables was: DO $$ DECLARE tablename record; BEGIN for tablename in SELECT relname from pg_class where relkind = 'r' and relname ~ 'raw_crashes_' LOOP RAISE NOTICE 'creating %', tablename; EXECUTE 'CREATE INDEX ' || quote_ident(tablename.relname) || '_date_processed' || ' ON ' || quote_ident(tablename.relname) || ' (date_processed)'; END LOOP; END$$; Change to the report_partitions_info table was: update report_partition_info set indexes = '{"date_processed"}' where table_name = 'raw_crashes';
Assignee: nobody → sdeckelmann
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-][DB Changes]
Target Milestone: --- → 59
You need to log in
before you can comment on or make changes to this bug.
Description
•