Skip to content
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

Add COPY performance summary log message #1

Open
pingles opened this issue May 29, 2013 · 0 comments
Open

Add COPY performance summary log message #1

pingles opened this issue May 29, 2013 · 0 comments

Comments

@pingles
Copy link
Contributor

pingles commented May 29, 2013

Copy statement performance is stored in the stl_s3client table. It'd be awesome to see a log message at the end of the COPY statement to show how much data was loaded, how long it took, the size of the transfer etc.

Example query below:

SELECT SUBSTRING(q.querytxt,1,60) AS querytxt,
       s.n_files,
       transfer_size_mb,
       data_size_mb,
       s.time_seconds,
       s.transfer_size_mb/decode(s.time_seconds,0,1,s.time_seconds) AS transfer_mb_per_s,
       s.data_size_mb/decode(s.time_seconds,0,1,s.time_seconds) AS data_mb_per_s
FROM
(
  SELECT query,
         COUNT(*) AS n_files,
         SUM(transfer_size/(1024*1024)) AS transfer_size_MB,
         SUM(data_size/(1024*1024)) AS data_size_MB,
         (MAX(end_Time) - MIN(start_Time))/(1000000) AS time_seconds,
         MAX(end_time) AS end_time
  FROM   stl_s3client
  WHERE  query > 0 AND transfer_time > 0
  GROUP BY query
) AS s
LEFT JOIN stl_Query AS q ON q.query = s.query
ORDER BY end_time DESC
LIMIT 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant