_b_tree_bitmap_plans

Oracle B-Tree Bitmap Plans
探讨了Oracle数据库中_b_tree_bitmap_plans参数的作用及其默认设置的变化。该参数允许成本基于优化器(CBO)为仅包含B-树索引的表生成位图计划,即使不存在位图索引也能使用位图访问路径。

有时,我们会看到执行计划里有这样的内容:

bitmap conversion from rowids

Metalink note 225466.1

·  symptom: Execution plan operation shows bitmap conversion from rowids

·  symptom: No bitmap indexes

·  symptom: Execution plan shows BITMAP CONVERSION

·  cause: In 7.3.4 and in 8.1.7 default value of _b_tree_bitmap_plans is FALSE
whereas as of 9.0.1 (and 9.2) the default value is TRUE When _b_tree_bitmap_plans set to true (advice not to change the default setting yourself) the optimizer is allowed to produce bitmap plans for normal b*tree indexes even if no bitmap indexes set.


fix:

This is intended behaviour if _b_tree_bitmap_plans set to true
If this is unwanted leave _b_tree_bitmap_plans at default value (false)

 

 

_b_tree_bitmap_plans un-documented parameter in Oracle

 

The default value of this parameter is set to TRUE in Oracle 9iR2 and Oracle 10g.  When this parameter is set to TRUE in the init.ora parameter file, it enables bitmap plans to be generated for tables with only B-Tree indexes.  CBO (Cost Based Optimizer) can choose to use bitmap access paths without the existence of bitmap indexes and in order to do so, it uses BITMAP CONVERSION FROM ROWIDS and BITMAP CONVERSION TO ROWIDS operations. Those operations are CPU intensive.  So, if you have a query in the system for which those operations are performed selects a small number of rows, then there isn’t much of an impact. However, if those queries select a large number of rows, the cost involved gets escalated pretty soon.  The cost is not incurred during the parse, it’s all incurred during the fetching.  In order to prevent issues arising from the wrong plan getting generated, if you are facing any such issues, this parameter should be explicitly set to False either at the database level or at the session level if you can identify a certain portion of the code running into such an issue and can isolate the connections based on program name etc..

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10173379/viewspace-661982/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10173379/viewspace-661982/

在技术文档或开发环境中,`MC_BITMAP_LIGHT` 通常可能作为与位图(Bitmap)操作相关的常量出现,尤其在涉及图形渲染、图像处理或特定平台的开发框架中。尽管 `MC_BITMAP_LIGHT` 并非 Android SDK 或标准 Java/Android 开发中公开定义的常见常量,但在某些特定上下文(如自定义图形引擎、嵌入式系统或专有开发框架)中,它可能是用于控制位图渲染模式、图像质量或光源效果的标识。 ### 位图操作中的常量定义与使用 在图像处理中,位图常量通常用于指定图像的渲染方式、压缩格式或光源模型。例如,在某些图形引擎中,常量可能被定义如下: ```c #define MC_BITMAP_LIGHT 0x0001 ``` 该常量可能表示启用某种光照效果或优化模式,用于影响图像在屏幕上的显示方式。其使用方式可能如下: ```c void renderBitmap(Bitmap* bitmap, int flags) { if (flags & MC_BITMAP_LIGHT) { applyLightingEffect(bitmap); } drawBitmap(bitmap); } ``` ### 开发环境与上下文 如果 `MC_BITMAP_LIGHT` 出现在 C/C++ 图形库或与 OpenGL、Vulkan 等图形 API 相关的代码中,它可能用于控制着色器中的光照计算模式。例如: ```glsl uniform int u_bitmapFlags; if (u_bitmapFlags & MC_BITMAP_LIGHT) { // 启用光照计算 color = applyLighting(color); } ``` 在 Android 平台上,虽然没有直接定义 `MC_BITMAP_LIGHT`,但类似的功能可以通过 `Paint` 或 `Canvas` 的设置实现,例如通过 `Paint.setShader()` 或 `ColorMatrixColorFilter` 来模拟光照效果[^3]。 ### 替代方案与扩展应用 在标准 Android 开发中,若需实现类似“位图光照”效果,可使用以下方法: ```java ColorMatrix colorMatrix = new ColorMatrix(); colorMatrix.set(new float[]{ 1, 0, 0, 0, 50, // 增加红色通道亮度 0, 1, 0, 0, 50, 0, 0, 1, 0, 50, 0, 0, 0, 1, 0 }); ColorMatrixColorFilter filter = new ColorMatrixColorFilter(colorMatrix); paint.setColorFilter(filter); canvas.drawBitmap(bitmap, 0, 0, paint); ``` ### 总结 `MC_BITMAP_LIGHT` 可能是某个特定图形库或开发框架中定义的位图操作常量,用于控制图像的光照渲染模式。其具体定义和使用方式取决于所处的开发环境与图形系统。在标准 Android 开发中,可通过 `ColorMatrix` 或自定义着色器实现类似效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值