TIBCO LogLogic LMI - Using 'less' inside MySQL

TIBCO LogLogic LMI - Using 'less' inside MySQL

book

Article ID: KB0078065

calendar_today

Updated On:

Products Versions
TIBCO LogLogic Enterprise Virtual Appliance all versions

Description

When working with large data sets, or pages of debugging information, it can be difficult to navigate through the returned results.  To that end, we can use the Linux program less to make management easier.

Issue/Introduction

This article shows how to use the Linux application 'less' inside MySQL to manage large result sets.

Resolution

To use less inside MySQL, type the following and press Enter:

mysql> pager less;
PAGER set to 'less'


Thereafter, every query result set will be returned inside less, and you can navigate as normal using the standard less control keys.  To return to the standard MySQL pager, simply type the following and press Enter:

mysql> pager;
Default pager wasn't set, using stdout.


If you don't want to page through all the results and instead just return to the MySQL prompt then press 'q' at any time. Unfortunately, doing so will erase the query results from the screen so they can't be used for reference.