![]() ![]() On this Redshift cluster (2-node dc1.large), the query took 20.52 seconds to execute. You can create a table without the DISTKEY before setting it and see how the query performs: CREATE TABLE system_errors1 ( The query gets the number of errors per error type for each time slice: SELECT err_code, created_at, count(*) FROM system_errors1 GROUP BY created_at, err_code Here, there is a query that needs optimizing. ![]() Each table has 282 million rows (lots of errors!). Each record of the table consists of an error that happened on a system with its (1) timestamp, and (2) error code. This is normally used for small but frequently joined tables such as lookup tables.ĭistribution of a table is defined using the DISTSTYLE and/or DISTKEY.This example uses a series of tables called system_errors# where # is a series of numbers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |