Skip to primary content
Skip to secondary content

Ramblings

Ramblings which occasionally resemble reality. This is the blog of Stewart Smith.

Ramblings

Main menu

  • Home
  • Bio
  • Contact

Tag Archives: metadata

Drizzle metadata tables

Posted on 08/02/2011 by Stewart Smith
Reply

Giuseppe has a great post about the Evolution of MySQL metadata, and I thought I’d have a look at what we have in Drizzle. It’s pretty easy to work out how many tables are in each schema, we just query the standard INFORMATION_SCHEMA.TABLES view:

drizzle> select table_schema,count(table_name)
    ->  from information_schema.tables
    -> group by table_schema;
+--------------------+-------------------+
| table_schema       | count(table_name) |
+--------------------+-------------------+
| DATA_DICTIONARY    |                53 |
| INFORMATION_SCHEMA |                20 |
+--------------------+-------------------+
2 rows in set (0 sec)

In Drizzle it’s important to note that there is a differentiation between SQL Standard INFORMATION_SCHEMA tables (found in the INFORMATION_SCHEMA schema) and the extensions and extra information available from Drizzle that is Drizzle specific (found in DATA_DICTIONARY). Since I know that the PostgreSQL version I have on my laptop (8.4) also implements INFORMATION_SCHEMA, I can run this query there as well:

stewart=# select table_schema,count(table_name)
 from information_schema.tables
 group by table_schema;
    table_schema    | count
--------------------+-------
 information_schema |    55
 pg_catalog         |    78
(2 rows)

If we had written the query to the Drizzle DATA_DICTIONARY tables, it only may have been portable – and as we can see, certainly wouldn’t have run unmodified on PostgreSQL. Personally, I really like this feature, and wish more systems did something like it.

Share this:

  • Facebook
  • Reddit
  • LinkedIn
  • Twitter

Like this:

Like Loading...
Posted in drizzle | Tagged data_dictionary, drizzle, INFORMATION_SCHEMA, metadata, mysql, postgresql | Leave a reply

Tags

  • Beer
  • Blackbird
  • bug
  • bzr
  • c++
  • code
  • coffee
  • conference
  • debian
  • drizzle
  • fail
  • film
  • firmware
  • freedom
  • frm
  • gcc
  • haildb
  • innodb
  • libeatmydata
  • linux
  • linux-aus
  • linux.conf.au
  • mariadb
  • mysql
  • ndb
  • OPAL
  • OpenPower
  • opensolaris
  • percona
  • photography
  • POWER
  • POWER8
  • powerpc
  • protobuf
  • skiboot
  • solaris
  • sparc
  • sql
  • StorageEngine
  • storage engine api
  • talk
  • ubuntu
  • vegan
  • win32
  • windows

Recent Comments

  • Stewart Smith on Refurbishing my Macintosh Plus
  • Ed Taggart on Refurbishing my Macintosh Plus
  • senden9 on Why you should use `nproc` and not grep /proc/cpuinfo
  • Yu Lei on Why you should use `nproc` and not grep /proc/cpuinfo
  • Brad Hards on Why you should use `nproc` and not grep /proc/cpuinfo
February 2021
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28  
« Jan    

Archives

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Cool things

Become a Conservancy Supporter!
Proudly powered by WordPress
%d bloggers like this: