Postico icon indicating copy to clipboard operation
Postico copied to clipboard

Postico 2: Creating one-off queries is clumsy

Open jakob opened this issue 5 years ago • 8 comments

Feedback from @9mm (originally posted here)

I don't know if this is a good spot to comment on Postico 2 as well, but the one thing keeping me from using it is it's no longer able to do an SQL query in one click. That's mostly the whole point of why I use Postico for many production servers.

Now, many clicks are involved and it just feels very clunky/clumsy to do a single query, and that it just saves every single one. I rarely am wanting to save what I'm doing. Maybe there can be a "Quick SQL" section above the one where it automatically stores it or something...

jakob avatar Feb 26 '20 09:02 jakob

Postico 2 by defaults creates a single query file named "SQL Query". I assumed that people would just use that one file for quick one-off queries.

I don't see why Postico 2 requires more clicks if you just use a single query file. You can use that query file just like in Postico 1. At least that was my thinking. Is there a reason why you aren't doing that?

jakob avatar Feb 26 '20 09:02 jakob

You're right - I misremembered. It's one click, but the clumsiness of it made me remember it as more.

I think what I really dislike is how cramped it gets with the huge search box. When theres only 1 query, it moves all the tables down and takes up lot of real-estate

9mm avatar Feb 26 '20 21:02 9mm

I see the point of @9mm - the process feels kinda heavy.

For me it is especially annoying if I don't have a place to put an ad-hoc query. This can happen if I recently organised my queries. Since the separate files have now are associated with certain purposes, it feels bad to just trow in a quick query, since it probably doesn't belong in file where I'm fine-tuning some function ...

I don't have a great suggestion for an interface. One thing I can image would be to put a query field as an alternative to the filter interface. This query field could contain the current table query (with filters, order, offset ...). It would potentially de-couple the shown data from the selected table, but this would only happen by user action (and I presume it's a feature that only more experienced user would use anyway). You could also display a warning stripe with a reset button if a user defined query is active for the currently selected table.

qwesda avatar Apr 27 '20 10:04 qwesda

Folks, I don't know if I am on your same page, but in Postico 1.x I seem to get a different edit space in the SQL query functionality for each DB for each tab, so that I can have different queries in each, which is incredibly useful.

Unfortunately,in Postico2 the content of SQL query is the same for every DB and every tab (I hope it is different for different connections), which makes the functionality incredibly annoying to use if not useless.

Oh, yes, in Postico2 I can have different files and folders, which is definitely nice, but only for consolidated sets of queries, for a more structured use, not for playing interactively with what if scenarios or doing interactive analysis. And anyhow, why shoud I have the very same list of files and folders in different DBs and tabs? It pollutes my sidebar with stuff which is not DB specific, while the rest of the sidebar is completely DB specific.

FedericoMassaioli avatar Jun 18 '20 15:06 FedericoMassaioli

Separating queries by database probably makes sense. I personally use separate favorites for each database, so that's something that I haven't really paid enough attention to.

Regarding easier queries for exploration, one thing we've been thinking about was to automatically create a new query file when you open a new tab. When you close the tab, Postico could ask if you want to save the query file when you close it. That would make it less annoying to create new queries, and you could just discard the query when you don't need it any more.

jakob avatar Jun 18 '20 15:06 jakob

@FedericoMassaioli wow thats a GREAT point. I didn't even notice that yet as I have been testing Postico 2 with only one database in it. My main instance of Postico 1 has about 2 dozen databases in it, and if it doesnt save the query for each that would make me go totally crazy, definitely enough to not use the app.

Favorites are cool but generally I only open Postico to run one off queries, which are different every single time.. so while i do use regular ones (good for favorites) its only about 30% of time.

Clarification, the one off queries are close enough to previous queries though that it doesnt warrant a favorite, but it does warrant having it be 'remembered'. I use it more like a scratch pad, rather than a "full established booklet of each query i need to run remotely"

9mm avatar Jun 18 '20 17:06 9mm

@9mm Just to clarify, Postico 2 does have separate queries for every connection/server, but when you connect to a server and then switch databases it doesn't have a sepearate queries folder for each database on the same server. I think this is what @FedericoMassaioli was complaining about, and we should probably change it, but it's not as bad as all connections having the same queries.

jakob avatar Jun 18 '20 18:06 jakob

@9mm: Me too I prefer to use a favorite for each server, the more so in Postico2 thanks to the incredibly handy "Show Databases" button. I use separate favorites for the same server only when I have to test or work with database specific user/role.

@jakob: A new query file for each new tab would be an elegant solution to the tab behavior.

Wrt. databases, I'd strongly prefer a separate query file group for each databases, but I understand there are conflicting use cases. Could this maybe be one of the favorite settings? Were it the case, if the correspondence between databases and queries set is not cumbersome to track, per database queries could be implemented with favorite level folders, so that switching back and forth between per-favorite/per-database query sets would just involve the initial folder opened in the SQL Queries pane.

FedericoMassaioli avatar Jun 19 '20 07:06 FedericoMassaioli