在升级到Oracle 11g之后我无法优化Oracle查询,这个问题开始让我有点生气.
请注意,此问题现已完全编辑,因为在创建简单测试用例后我有更多信息.原始问题可在此处获得:https://stackoverflow.com/revisions/12304320/1.
此问题是,当连接两个表时,其中一个表between在日期列上具有条件,如果查询连接到远程表,则不会发生绑定查看.
这是一个帮助重现问题的测试用例.首先设置两个源表.第一个是日期列表,是本月的第一个,可以追溯到三十年前
create table mike_temp_etl_control
as
select
add_months(trunc(sysdate, 'MM'), 1-row_count) as reporting_date
from (
select level as row_count
from dual
connect by level < 360
);
Run Code Online (Sandbox Code Playgroud)
然后一些数据来自dba_objects:
create table mike_temp_dba_objects as
select owner, object_name, subobject_name, object_id, created
from dba_objects
union all
select owner, object_name, subobject_name, object_id, created
from dba_objects;
Run Code Online (Sandbox Code Playgroud)
然后创建一个空表来运行数据到:
create table mike_temp_1
as
select
a.OWNER,
a.OBJECT_NAME,
a.SUBOBJECT_NAME,
a.OBJECT_ID,
a.CREATED,
b.REPORTING_DATE
from
mike_temp_dba_objects a
join mike_temp_etl_control b on ( …Run Code Online (Sandbox Code Playgroud) 我一直在编写[MPMusicPlayerController applicationMusicPlayer]用于播放音乐的代码.
这已成功运行,并将在控制中心屏幕上显示当前播放曲目的详细信息.
不幸的是,我似乎无法通过控制中心屏幕或耳机使遥控器按钮工作.
我已经启用了应用程序的后台音频将在后台播放,并使用类似于下面所示的代码启用了一些MPRemoteCommandCenter命令.下面的代码基于我在文档和SO问题中看到的内容
MPRemoteCommandCenter *rcc = [MPRemoteCommandCenter sharedCommandCenter];
MPRemoteCommand *playCommand = rcc.playCommand;
playCommand.enabled = YES;
[playCommand addTargetWithHandler:^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent *event) {
MPMusicPlayerController *musicPlayer = [MPMusicPlayerController applicationMusicPlayer];
[musicPlayer play];
NSLog(@"Play button pressed");
return MPRemoteCommandHandlerStatusSuccess;
}];
Run Code Online (Sandbox Code Playgroud)
使用上面的代码,它将导致控制中心按钮不执行任何操作或启动音乐应用程序播放.
我确信有一些简单的东西让我很遗憾,但似乎无法看到它.我已经尝试过调用,[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];但据我所知,这并不应该与MPRemoteCommandCenter一起使用.
我正在使用Xcode 6.2和iOS 8.2.
我已经尝试了我能想到的所有内容......如何让MPRemoteCommandCenter按照我的预期运行?