Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 10 Question 50 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 50
Topic #: 10
[All PGCES-02 Questions]

The table "t1" is defined by the following SQL statement: CREATE TABLE t1 (id integer, name varchar(20)); You want to increase the execution speed of the SQL statement below: SELECT id, name FROM t1 WHERE id < 123 AND upper(name) = 'MAMMOTH'; Select the most suitable SQL statement to create an index.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Ettie
12 days ago
But creating an index on name column only, like option C, might not be efficient for this specific query.
upvoted 0 times
...
Olive
13 days ago
Option A seems like the most suitable choice. Creating an index on the ID column and the UPPER(name) function will allow the database to quickly filter the results based on the ID range and the converted name value.
upvoted 0 times
...
Erasmo
14 days ago
I disagree, I believe option B is better as it uses HASH which can improve performance.
upvoted 0 times
...
Ettie
25 days ago
I think option A is the best choice because it creates an index on both id and upper(name) columns.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77