Summary
In this chapter, we covered two PostgreSQL tools: one GUI tool and one command-line tool. While the GUI tool might be easier to learn than the other one, it's better to learn the command-line tool because it provides you with a lot of flexibility. For example, you could create SQL files, call them from shell scripts and schedule them in cron. For such automated batch jobs, psql usually proves to be more powerful than a GUI tool. Also, for efficiency, it's better to work from command line. Typing \d
and hitting Enter is faster than moving the mouse around; click on an icon and wait for the data to be displayed. In some cases, such as the execution plan for a query, the visual display might be easier to understand than text. Choosing between a point-and-click option and a command-line option is definitely a matter of personal preference. You can take your pick.
In the next chapter, we will take a look at the PostgreSQL optimizer and see how queries can be optimized with this information...