Questões de Tecnologia da Informação · FAT Concursos

Tecnologia da InformaçãoAdministração de banco de dados (Oracle, MySQL, PostgreSQL e SQL Server)FAT Concursos 2008

CET SP

Questão de Tecnologia da Informação

Piece of text extracted from the PostgreSQL's Manual 13.1. Using EXPLAIN PostgreSQL devises a query plan for each query it is given. Choosing the right plan to match the query structure and the properties of the data is absolutely critical for good performance, so the system includes a complex planner that tries to select good plans. You can use the EXPLAIN command to see what query plan the planner creates for any query. Plan-reading is an art that deserves an extensive tutorial, which this is not; but here is some basic information. The structure of a query plan is a tree of plan nodes. Nodes at the bottom level are table scan nodes: they return raw rows from a table. There are different types of scan nodes for different table access methods: sequential scans, index scans, and bitmap index scans. If the query requires joining, aggregation, sorting, or other operations on the raw rows, then there will be additional nodes "atop" the scan nodes to perform these operations. Again, there is usually more than one possible way to do these operations, so different node types can appear here too. The output of EXPLAIN has one line for each node in the plan tree, showing the basic node type plus the cost estimates that the planner made for the execution of that plan node. The first line (topmost node) has the estimated total execution cost for the plan; it is this number that the planner seeks to minimize.

If your goal is to improve the performance on your database server it is important to

Sua resposta

Mais questões de Administração de banco de dados (Oracle, MySQL, PostgreSQL e SQL Server)

Questão de prova oficial, com o gabarito definitivo publicado pela banca. Reproduzida para fins de estudo.