1

With QGIS I can manipulate data stored on a PostGIS Geodatabase.

In order to query to the geodatabase, is it better to do it from QGIS or directly in PostGIS?

What are the benefits of querying in PostGIS?

2
  • 3
    I don't think that this is primarily opinion based, just take a look at the hard facts mentioned in the answer and in the comments below. Aug 25 '16 at 7:30
  • Maybe this question doesn't resonate with ArcGIS users? Aug 25 '16 at 14:09
7

You would use PGAdmin instead - which is the GUI to PostgreSQL - which gives access to all the functions in PostGIS through the SQL window.

We use PostGIS every day - but rarely write SQL queries in DBManager (QGIS Plugin). Although access to the spatial functions is a bit more intuitive in DBManager, PGAdmin is really the tool to interact with our data - QGIS is the tool to visualize it.

PGAdmin is also better for viewing your database components, saving and running saved .SQL files, etc.

2
  • 5
    Also note that a major benefit is that if you run a complex or intensive task type query in QGIS, you have to wait for that to finish before QGIS becomes functional (QGIS hangs), so using an external app like psql or pgadmin offloads the wait time there.
    – SaultDon
    Aug 24 '16 at 15:12
  • 3
    Even better, use a terminal (linux) or putty or similar for windows and some sort with a screen session. If you have a disconnect, which can happen with long-running queries for pgAdmin, you can reconnect and your query will not be lost. Obviously, if your queries only run for a short time this does not matter and pgAdmin is more friendly if you are new to Postgres/Postgis. Aug 24 '16 at 15:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.