Skip to content

Instantly share code, notes, and snippets.

@Nitrodist
Created November 30, 2011 11:36
Show Gist options
  • Save Nitrodist/1408769 to your computer and use it in GitHub Desktop.
Save Nitrodist/1408769 to your computer and use it in GitHub Desktop.
MariaDB [btt]> select * from searches into outfile '/var/tmp/out';
Query OK, 26292 rows affected (0.04 sec)
MariaDB [btt]> show session status like '%cost%';
+-----------------+-------------+
| Variable_name | Value |
+-----------------+-------------+
| Last_query_cost | 5409.399000 |
+-----------------+-------------+
1 row in set (0.00 sec)
MariaDB [btt]> select querY FROM^CCtrl-C -- exit!tfile '/var/tmp/out';
Aborted
mark@linux-qmbm ~$ mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 478
Server version: 5.2.9-MariaDB-log SUSE MySQL RPM
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use btt
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [btt]> select query from searches into outfile '/var/tmp/queryout';
Query OK, 26292 rows affected (0.06 sec)
MariaDB [btt]> show session status like '%cost%';
+-----------------+-------------+
| Variable_name | Value |
+-----------------+-------------+
| Last_query_cost | 5409.399000 |
+-----------------+-------------+
1 row in set (0.00 sec)
MariaDB [btt]>
MariaDB [btt]> select * from searches limit 5;
+-------+----------+---------------------+------------+
| id | query | created_at | updated_at |
+-------+----------+---------------------+------------+
| 32546 | lGGlS8Tz | 2011-11-24 05:22:07 | NULL |
| 32547 | PEsaCWH6 | 2011-11-25 05:22:07 | NULL |
| 32548 | wwxiELu7 | 2011-11-24 05:22:07 | NULL |
| 32549 | iG1_oRHR | 2011-11-29 05:22:07 | NULL |
| 32550 | MBf1ohNE | 2011-11-28 05:22:07 | NULL |
+-------+----------+---------------------+------------+
5 rows in set (0.00 sec)
MariaDB [btt]> select query from searches limit 5;
+----------+
| query |
+----------+
| lGGlS8Tz |
| PEsaCWH6 |
| wwxiELu7 |
| iG1_oRHR |
| MBf1ohNE |
+----------+
5 rows in set (0.00 sec)
MariaDB [btt]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment