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
  • Archives
  • Bio
  • Contact

Tag Archives: metadata

Drizzle metadata tables

Posted on 2011-02-08 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:

  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X

Like this:

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

Find me on

  • The Fediverse / Mastodon
  • Twitter @stewartsmith
    • Linkedin (stewartsmith)
    • Fedora (trawets)

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 Posts

  • Using llvm-mca for predicting CPU cycle impact of code changes2024-01-13
  • Personal Finance Apps2023-09-08
  • Fitness watches and my descent into madness2023-09-03
  • Random useful macOS things for Linux developers2023-08-27
  • Getting your photos out of Shotwell2023-06-25
  • Adventures in the Apple Partition Map (Part 2 of the continuing adventures with the Apple Power Macintosh 7200/120 PC Compatible)2022-02-02
  • Every time I program a Mac…2022-02-02
  • An Unearthly Child2021-05-16
  • libeatmydata v1292021-04-11
Tweets by stewartsmith
Twitter

Cool things

Become a Conservancy Supporter!
Proudly powered by WordPress
 

Loading Comments...
 

    %d