Did you try to change the settings in Preferences for Query Builder? That may change a lot, by default a lot of data is transferred for each change (all levels on database, previews etc).
Additionally, once you made the query via GUI, you can convert it into custom SQL to create plain SQL. That then will be processed at the database only and is much faster.
My best known method is always doing the heavy stuff on database, but this always depends on the environment. There are other tools that let you define the query at database, that you can use in JMP (e.g. SQL Query Builder, depending on your database vendor).
Also you could ask your IT (e.g. database administrator) to help you with certain queries that are needed regularly, and import the plain SQL into JMP.
Getting the data from database in the right format is crucial, and it's worth to look at the full process finally.
Georg