New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes bug 1212088 - Expose graphics related CSV report via webapp #3027
fixes bug 1212088 - Expose graphics related CSV report via webapp #3027
Conversation
@AdrianGaudebert Note in the last iteration that I put adu_count sub-select back in because they have stated that they need that. So, I suggest we land this (pending review of course!) and evaluate what to do once we see if this is hurting our PG. |
91affa2
to
0572464
Compare
r.os_version, --11 | ||
r.cpu_name || ' | ' || r.cpu_info as cpu_info, --12 | ||
r.address, --13 | ||
ARRAY(SELECT 1 WHERE FALSE) as bug_list, --14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the doc, you can write ARRAY[]
instead, but I haven't tested it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breakpad=> select ARRAY[] As things;
ERROR: cannot determine type of empty array
LINE 1: select ARRAY[] As things;
^
HINT: Explicitly cast to the desired type, for example ARRAY[]::integer[].
breakpad=> select ARRAY(select 1 where false) As things;
things
--------
{}
(1 row)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried something like that first but it didn't work. The reason I ended up with ARRAY(SELECT 1 WHERE FALSE)
was because I found some stackoverflow post that tried to answer the same question I think I had.
r+ |
0572464
to
42e1073
Compare
…ated-csv-report-via-webapp fixes bug 1212088 - Expose graphics related CSV report via webapp
@AdrianGaudebert r?
cc @twobraids
I'd like to get some early eyes on this whilst I wait for the Graphics team to get back to me about which columns we can blanket out. E.g.
adu_count
.Once we have the most expensive columns blanket'ed out (e.g.
adu_count
andduplicate_of
) that query will become many many times faster.How to test this? Run the branch and load http://socorro.dev/graphics_report/?date=2015-10-08 for example. Note that you need to be logged in.
How to test it on the command line...
First you need to generate an API token that has the "Run long queries" permission.
Then something like this:
Or if you want to test that it gets gzipped properly, download it like this:
And then you should be able open
/tmp/reports.csv
in Excel or Quip or Libreoffice or whatever you prefer.