Modify the SQL statement used in the show_ports() function for performance purposes