2024. 12. 2. 07:58ㆍ클라우드/GCP
Task 1. Create Baseline Dataset for Testing the Columnar Engine


export ALLOYDB=ALLOYDB_ADDRESS |
echo $ALLOYDB > alloydbip.txt |
pgbench -h $ALLOYDB -U postgres -i -s 500 -F 90 -n postgres |

psql -h $ALLOYDB -U postgres |
select count (*) from pgbench_accounts; |

Task 2. Run a Baseline Test
\timing on |
SELECT aid, bid, abalance FROM pgbench_accounts WHERE bid < 189 OR abalance > 100 LIMIT 20; |

EXPLAIN (ANALYZE,COSTS,SETTINGS,BUFFERS,TIMING,SUMMARY,WAL,VERBOSE) SELECT count(*) FROM pgbench_accounts WHERE bid < 189 OR abalance > 100; |

Task 3. Verify the Database Flag for the Columnar Engine




Notice that the flag named google_columnar_engine.enabled is already enabled (status of on). You will not add an additional flag as part of this lab.
Task 4. Set or Verify a Database Extension for the Columnar Engine
\c postgres |
\dx |
CREATE EXTENSION IF NOT EXISTS google_columnar_engine; |
\dx |

Task 5. Testing the Columnar Engine
SELECT google_columnar_engine_add('pgbench_accounts'); |

EXPLAIN (ANALYZE,COSTS,SETTINGS,BUFFERS,TIMING,SUMMARY,WAL,VERBOSE) SELECT count(*) FROM pgbench_accounts WHERE bid < 189 OR abalance > 100; |

참고 : https://www.cloudskillsboost.google/paths/22/course_templates/642/labs/501234
Accelerating Analytical Queries using the AlloyDB Columnar Engine | Google Cloud Skills Boost
In this lab, you explore features of the AlloyDB Columnar Engine.
www.cloudskillsboost.google
'클라우드 > GCP' 카테고리의 다른 글
22. Migrate to Cloud SQL for PostgreSQL using Database Migration Service (0) | 2024.12.04 |
---|---|
21. Create and Manage AlloyDB Instances: Challenge Lab (1) | 2024.12.03 |
19. Administering an AlloyDB Database (0) | 2024.11.27 |
18. Migrating to AlloyDB from PostgreSQL Using Database Migration Service (0) | 2024.11.26 |
17. AlloyDB - Database Fundamentals (0) | 2024.11.25 |