'Stored routines' Tag

  • Auto caching tables

    March 6, 2012

    Is there a way to create a caching table, some sort of a materialized view, such that upon selecting from that table, its data is validated/invalidated? Hint: yes. But to elaborate the point: say I have some table data_table. Can I rewrite all my queries which access data_table to read from some autocache_data_table, but have [...]

  • Documentation in SQL: CALL for help()

    January 11, 2012

    Documentation is an important part of any project. On the projects I maintain I put a lot of effort on documentation, and, frankly, the majority of time spent on my projects is on documentation. The matter of keeping the documentation faithful is a topic of interest. I'd like to outline a few documentation bundling possibilities, [...]

  • common_schema, rev. 178: foreach(), repeat_exec(), Roland Bouman, query analysis

    December 1, 2011

    common_schema, revision 178 is now released, with major additions. This revision turns common_schema into a framework, rather than a set of views and functions. common_schema provides with query scripting, analysis & informational views, and a function library, allowing for easier administration and diagnostics for MySQL. It introduces SQL based tools which simplify otherwise complex shell [...]

  • Self throttling MySQL queries

    November 1, 2011

    Recap on the problem: A query takes a long time to complete. During this time it makes for a lot of I/O. Query's I/O overloads the db, making for other queries run slow. I introduce the notion of self-throttling queries: queries that go to sleep, by themselves, throughout the runtime. The sleep period means the [...]

  • Test-driven SQL development

    October 20, 2011

    I'm having a lot of fun writing common_schema, an SQL project which includes views, tables and stored routines. As the project grows (and it's taking some interesting directions, in my opinion) more dependencies are being introduced, and a change to one routine or view may affect many others. This is why I've turned the development [...]

  • MySQL eval()

    September 6, 2011

    I've just implemented an eval() call for MySQL. It is implemented with SQL, using a stored procedure. So this is not some plugin: you can use it from within your normal database server. Just what is an eval() call? In some programming languages it would mean: get some text, and execute it as though it [...]

  • Announcing common_schema: common views & routines for MySQL

    July 13, 2011

    Today I have released common_schema, a utility schema for MySQL which includes many views and functions, and is aimed to be installed on any MySQL server. What does it do? There are views answering for all sorts of useful information: stuff related to schema analysis, data dimensions, monitoring, processes & transactions, security, internals... There are [...]

  • ROUTINE_PRIVILEGES implementation

    June 22, 2011

    Following up on MySQL security: inconsistencies, and on MySQL bug #61596, I was thinking it may take a long time till the non-existent ROUTINE_PRIVILEGES view is implemented. Here's my own implementation of the view. I've followed the somewhat strange conventions used in the *_PRIVILEGES tables in INFORMATION_SCHEMA, where the IS_GRANTABLE is a separate column, although [...]

  • Views: better performance with condition pushdown

    May 20, 2010

    Justin's A workaround for the performance problems of TEMPTABLE views post on mysqlperformanceblog.com reminded me of a solution I once saw on a customer's site. The customer was using nested views structure, up to depth of some 8-9 views. There were a lot of aggregations along the way, and even the simplest query resulted with [...]

 
Powered by Wordpress and MySQL. Theme by openark.org