Loading, please wait...

PostgreSQL MCQ Quiz (Multiple Choice Questions And Answers)

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

16. To create a database in PostgreSQL, you must have the special CREATEDB privilege or

  • be an admin
  • have a script do it.
  • be a superuser.
  • the special CREATETBL privilege

17. What does the following statement do?

CREATE INDEX lower_title_idx ON books ((lower(title)));
  • Modifies an index in place to be lowercase
  • Creates a new index with a special operator class ‘lower’ for case insensitive comparisons.
  • Creates an index for efficient case-insensitive searches on the titles column within the books table
  • Nothing, it’s invalid SQL
  • Creates a non-write-locking index

18. What command allows you to edit PostgreSQL queries in your favorite editor ?

  • \ed
  • edit sql #go
  • \e
  • \edit

19. Advisory locks are allocated out of a shared memory pool whose size is defined by the configuration variables….

  • max_connections
  • max_locks_per_transaction
  • None of these
  • Both 1 and 2

20. What is “index bloat”?

  • Index filling up with keys.
  • No-longer-needed keys in an index aren’t reclaimed, therefore increasing space required to store an index, as well as time it takes to scan.
  • Indexing inefficiently, like choosing to index timestamps in a table.
  • Indexing too many tables, resulting in inefficient database performance.