0
0
PostgreSQLquery~10 mins

ANALYZE for statistics collection in PostgreSQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to update statistics for the table named 'employees'.

PostgreSQL
ANALYZE [1];
Drag options to blanks, or click blank then click option'
Aemps
Bemployee
Cemployee_data
Demployees
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong or misspelled table name.
Forgetting the semicolon at the end.
2fill in blank
medium

Complete the code to analyze all tables in the current database.

PostgreSQL
[1];
Drag options to blanks, or click blank then click option'
AANALYZE DATABASE
BANALYZE employees
CANALYZE
DANALYZE ALL
Attempts:
3 left
💡 Hint
Common Mistakes
Using ANALYZE ALL or ANALYZE DATABASE is invalid syntax.
Specifying a table name analyzes only that table.
3fill in blank
hard

Fix the error in the code to analyze the table 'sales_data'.

PostgreSQL
ANALYZE [1];
Drag options to blanks, or click blank then click option'
Asales_data
B'sales_data'
Csales-data
Dsalesdata
Attempts:
3 left
💡 Hint
Common Mistakes
Using hyphens instead of underscores in table names.
Putting table names in single quotes.
4fill in blank
hard

Fill both blanks to analyze the table 'orders' with verbose output.

PostgreSQL
ANALYZE [1] [2];
Drag options to blanks, or click blank then click option'
AVERBOSE
Borders
CVERBOSITY
Dorder
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'order' instead of 'orders' as table name.
Using VERBOSITY instead of VERBOSE.
5fill in blank
hard

Fill all three blanks to analyze the table 'customers' with verbose output and sample rows.

PostgreSQL
ANALYZE [1] [2] ([3]);
Drag options to blanks, or click blank then click option'
Acustomers
BVERBOSE
CSAMPLE 1000
DSAMPLE 100
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong table name.
Using SAMPLE without a number or wrong number.
Forgetting parentheses around SAMPLE argument.