Speeding up your query with Temp Tables

If you have a query that: have a lot of subqueries join many different tables or subqueries going to return a huge amount of data take forever to run (more than 1 minutes) you have a busy database server You can run your query in a hundred times faster speed by storing some groups of […]

Better way to execute sql files in PostgreSQL

My previous post ┬áis kind of dumb. It’s simple, but dumb. First of all, the /o command will only write the output of a particular query into file. It won’t write any error or any other information that pop out during the execution. The last time I ran that, it failed and I don’t know […]