Adriano, I never measured, but I assume it should be fast, specially if the page is in the cache. But reading the same thing endless times in a batch operation looks like a waste of resources. I'm sure reading a context variable is much simpler/fast than the whole mechanism involved in running a select.
Please note that I just listed one specific use for such feature. I'm sure there are others that may not involve just updating context variables. Others may comment. []s Carlos http://www.firebirdnews.org FireBase - http://www.FireBase.com.br AdSF> On 26/02/2015 11:18, Carlos H. Cantu wrote: >> I'll give you a real example that could justify this need: >> >> In my ERP, I store some global configuration data in a config table. >> In several triggers, I need to keep reading this config table to get >> some values and use in IF's, etc. For batch operations, triggers will >> be executed several times. A much better/efficient approach would be >> to store some of the config data in session context variables, so >> there would be no need to keep reading the config table every time. >> >> AdSF> Is it really fast? AdSF> If your config table has a single row with each "variable" as a column, AdSF> it should be frequently cached. AdSF> How much you loose reading it directly? AdSF> Adriano ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel