Monthly Archives: May 2017

Linux and Wine compatibility

Here at Yohz Software, we receive the occasional email asking if our PostgreSQL-centric products run on Linux.  Being Windows applications, our products will run on Linux but requires Wine (the software, not the drink).  DB Doc has been able to run on Ubuntu since 2014, and we recently installed and ran PgComment and SQL Multi Select on Ubuntu 17.04 and Fedora 25.

SQL Multi Select on Fedora 25 and PlayOnLinux:

DB Doc on Ubuntu and Wine.

There are the occasional GUI quirks, which we try to fix as soon as possible, which is why you sometimes see different text and/or images if you run the same application on Windows.  If you discover any quirks/inconsistencies we have overlooked, please do drop us a line at support@yohz.com.

PostgreSQL statistics

PostgreSQL has a neat set of pg_stat views from which you can obtain statistics for tables, indexes, etc.  From DB Doc 4.2 and PgComment 1.2 onwards, you can now view the database, table, and index statistics in the DB Doc reports and in PgComment object inspector.

In DB Doc, database statistics are displayed on the database properties page

table statistics are displayed on each tables’ properties page

and index statistics (idx_scan, idx_tup_read, idx_tup_fetch) are displayed as part of the index definitions.

If you choose not to display the statistics, just deselect the Display database, table, and index statistics option.

 

PgComment, our free tool to easily add/modify comments to your PostgreSQL objects, displays the statistics details in the object inspector window.

– database statistics

 

– table statistics

 

– index statistics

SQL Multi Select on Ubuntu 17.04 and Wine 2.0.1

Well, SQL Multi Select mostly runs on Ubuntu 17.04 with Wine 2.0.1.  Instructions for installing Wine 2.0.1 on Ubuntu 17.04 can be found here.

What works:

  • running multiple statements in a script
  • using scripts located on Linux file system
  • displaying images in result set
  • using the command line interface to run projects
  • connecting to PostgreSQL databases via SSL connections
  • exporting results to text files and SQLite database

What doesn’t work:

  • clicking on the summary file to open it – you’ll need to manually locate and open the file
  • help file won’t open because it’s in a chm format – use the online help instead (http://www.yohz.com/help/dbdoc/index.html)

If you come across any other functionality that doesn’t work on Ubuntu, please do drop us a line at support@yohz.com.

Why use SQL Multi Select in addition to pgAdmin 4

Let me start by saying pgAdmin 4 is a great tool for PostgreSQL.  It makes a lot of the admin and monitoring work easier.  It’s also cross-platform, and it’s free.  On the other hand, SQL Multi Select is just a query tool, that runs only on Windows.  Well, it runs on Ubuntu using Wine, and on Fedora via PlayOnLinux.    The Basic Edition is free, and here are some reasons you may want to use SQL Multi Select as your PostgreSQL query tool instead of pgAdmin.  Note that pgAdmin 4 (1.4) was used for this comparison.

Multiple server targets

You can run queries on multiple PostgreSQL databases simultaneously with SQL Multi Select.  For example, say you want to run a script that returns every databases’ size.  Just set up a group containing the databases you want to run the query on:

Set up the scripts on run on each of those databases:

Run the script, and you’ll see the results for each of those databases, across all servers in the server group.

Multiple result sets

When you run the following in pgAdmin:

only the last result set is returned.

In SQL Multi Select, the same script returns multiple result sets.

To make things clearer, you can place comments before each individual script:

and SQL Multi Select will use those comments to identify the result sets instead of arbitrary numbers.

Image display

In bytea columns storing images, pgAdmin displays the hex values.

SQL Multi Select displays a thumbnail of the image (gif, jpeg, png, bmp, dicom), and some image properties.  Note that SQL Multi Select inspects the bytea values and identifies the image format automatically.  There is no need to provide another column that tells SQL Multi Select the image format.

 

Blob data identification

In bytea columns containing files, pgAdmin displays the hex values.

SQL Multi Select displays details of the data contained in those columns.  Note that SQL Multi Select inspects the bytea values and identifies the data type accordingly.

Result sets containing bytea columns return very slow

If your query returns bytea columns a few MBs in size, pgAdmin takes an extremely long time to return the result set when compared to SQL Multi Select.  For e.g. this query returns a single bytea column that contains a 13 Mb zip file.  pgAdmin takes 7 minutes to display the single row:

SQL Multi Select returns the same result set in 1 second.

 

Search function

In SQL Multi Select, you can search for a value in the result sets.  You can also use a regular expression to search for values.

pgAdmin is still great for administrative tasks, but as a query tool, SQL Multi Select may be better in some cases.  Download SQL Multi Select and give it a try now.  The 14-day trial will be automatically converted to the FREE Basic Edition once the trial period has elapsed.

Related blogs: