I"ever never been a fan of the */!... */ syntax. A general query modifier is fine there.
We were talking on IRC and one other ideas was to make it behave sort of like how you would use transactions: ENABLE CACHE; SELECT ... DISABLE CACHE; SELECT ... Could even use modifiers here (though I am not sure what syntax would be best): ENABLE CACHE(lifetime=300); ... *shrug* On Aug 5, 2010, at 12:48 PM, Roland Bouman wrote: > Hi All, > > jus throwing this in here - I would like on demand - I have not find > cases where I wanted to either cache all or nothing. > > For on demand, I would prefer a syntax that does not alter the SQL > syntax proper - rather, I would like something inside a SQL comment so > it doesn't collide with SQL clients that don't understand the > extension. Something like: > > SELECT /*!CACHE */ .... > > maybe throw in support for timed caching, like: > > SELECT /*!CACHE INTERVAL 10 MINUTE*/... > > just some ideas. > > On Thu, Aug 5, 2010 at 7:16 PM, Patrick Crews <[email protected]> wrote: >> I'm no expert, but I like the simplicity of approach #1. However, I think >> #2 gives users more flexibility. It would be interesting to hear some users >> thoughts. You might try pinging Sweetums (a MySQL DBA) to get his thoughts. >> On Wed, Aug 4, 2010 at 12:04 PM, djellel eddine Difallah >> <[email protected]> wrote: >>> >>> Hello Everyone, >>> >>> In my Gsoc Query Cache project, I came to a point where I need to decide >>> on the syntax to use to either cache a query resultset or not. For >>> reference, Mysql has a system variable "query_cache_type" that can set 3 >>> modes: >>> OFF : prevents caching or retrieval of cached results. >>> ON : enables caching except of those statements that begin with >>> SELECT SQL_NO_CACHE >>> DEMAND : causes caching of only those statements that begin with SELECT >>> SQL_CACHE >>> >>> Since Drizzle has a different approach (multiple query cache plugins might >>> be enabled) I'd like to check your preference on that. so any suggestion is >>> welcome ! >>> >>> My ideas: >>> 1) No system variable and just an on DEMAND kind of mode, where the >>> developer has to specifiy SQL_CACHE to get his query cached. >>> >>> 2) A system variable, but no OFF mode since a plugin can be >>> enable/disabled, but that means I need to set a default mode (ON or DEMAND). >>> >>> >>> That's being said, to do that I have to modify the sql_yacc.yy, and that >>> might not be so trivial. >>> >>> Thanks >>> ~ DeD >>> >>> >>> _______________________________________________ >>> Mailing list: https://launchpad.net/~drizzle-discuss >>> Post to : [email protected] >>> Unsubscribe : https://launchpad.net/~drizzle-discuss >>> More help : https://help.launchpad.net/ListHelp >>> >> >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~drizzle-discuss >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~drizzle-discuss >> More help : https://help.launchpad.net/ListHelp >> >> > > > > -- > Roland Bouman > blog: http://rpbouman.blogspot.com/ > twitter: @rolandbouman > > Author of "Pentaho Solutions: Business Intelligence and Data > Warehousing with Pentaho and MySQL", > http://tinyurl.com/lvxa88 (Wiley, ISBN: 978-0-470-48432-6) > > Author of "Pentaho Kettle Solutions: Building Open Source ETL > Solutions with Pentaho Data Integration", > http://tinyurl.com/33r7a8m (Wiley, ISBN: 978-0-470-63517-9) > > _______________________________________________ > Mailing list: https://launchpad.net/~drizzle-discuss > Post to : [email protected] > Unsubscribe : https://launchpad.net/~drizzle-discuss > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

