# 查看当前机器cpu物理个数:
select event,sum(decode(wait_time,0,0,1)) prev, sum(decode(wait_time,0,1,0)) curr,count(*)
from v$session_wait
group by event order by 4;
select name,waits,gets,waits/gets ratio from v$rollstat a,v$rollname b where a.usn=b.usn;
select df.tablespace_name name,df.file_name "file",f.phyrds pyr,f.phyblkrd pbr,f.phywrts pyw,
f.phyblkwrt pbw
from v$filestat f,dba_data_files df
where f.file#=df.file_id
select substr(a.file#,1,2) "#",substr(a.name,1,30) "name",a.status,a.bytes,
b.phyrds,b.phywrts
from v$datafile a,v$filestat b
where a.file#=b.file#
select user_indexes.table_name, user_indexes.index_name,uniqueness, column_name
from user_ind_columns, user_indexes
where user_ind_columns.index_name = user_indexes.index_name
and user_ind_columns.table_name = user_indexes.table_name
order by user_indexes.table_type, user_indexes.table_name,
user_indexes.index_name, column_position;
select a.value + b.value "logical_reads", c.value "phys_reads",
round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RATIO"
from v$sysstat a, v$sysstat b, v$sysstat c
where a.statistic# = 38 and b.statistic# = 39
and c.statistic# = 40;
select parameter, gets,Getmisses , getmisses/(gets+getmisses)*100 "miss ratio",
(1-(sum(getmisses)/ (sum(gets)+sum(getmisses))))*100 "Hit ratio"
from v$rowcache
where gets+getmisses <>0
group by parameter, gets, getmisses;
select sum(pins) "Total Pins", sum(reloads) "Total Reloads",
sum(reloads)/sum(pins) *100 libcache
from v$librarycache;
select sum(pinhits-reloads)/sum(pins) "hit radio",sum(reloads)/sum(pins) "reload percent"
from v$librarycache;
select count(name) num_instances ,type ,sum(source_size) source_size ,
sum(parsed_size) parsed_size ,sum(code_size) code_size ,sum(error_size) error_size,
sum(source_size) +sum(parsed_size) +sum(code_size) +sum(error_size) size_required
from dba_object_size
group by type order by 2;
SELECT name, gets, misses, immediate_gets, immediate_misses,
Decode(gets,0,0,misses/gets*100) ratio1,
Decode(immediate_gets+immediate_misses,0,0,
immediate_misses/(immediate_gets+immediate_misses)*100) ratio2
FROM v$latch WHERE name IN ('redo allocation', 'redo copy');
SELECT name, value FROM v$sysstat WHERE name IN ('sorts (memory)', 'sorts (disk)');
SELECT osuser, username, sql_text from v$session a, v$sqltext b
where a.sql_address =b.address order by address, piece;
SELECT (SUM(PINS - RELOADS)) / SUM(PINS) "LIB CACHE" FROM V$LIBRARYCACHE;
SELECT (SUM(GETS - GETMISSES - USAGE - FIXED)) / SUM(GETS) "ROW CACHE" FROM V$ROWCACHE;
SELECT SUM(PINS) "EXECUTIONS", SUM(RELOADS) "CACHE MISSES WHILE EXECUTING" FROM V$LIBRARYCACHE;
SELECT SUM(GETS) "DICTIONARY GETS",SUM(GETMISSES) "DICTIONARY CACHE GET MISSES"
FROM V$ROWCACHE
select * from sys.props$ where name='NLS_CHARACTERSET';
由于之前的eclipse中只有2.1 2.2 2.3版本的sdk,4.2都出来了于是乎考虑安装更新一个至少得是4.0吧,而且还有一些新的特性可能根本不知道呢?于是乎准备安装一下4.0,本以为直接在Android SDK Manager中就可以直接更新了,但是发现里面根本就没有亦或者我的网速慢或者没有耐心等到它显示出来最新的版本吧。
在最新的Android 4.0.3 R2模拟器中,已经加入了GPU支持,可以支持OpenGL ES 2.0标准,让开发者可以借助模拟器来测试自己的OpenGL游戏。在去年新增了摄像头支持之后,现在的新版模拟器也加入了包括多点触摸输入设备的支持,未来还将加入蓝牙和NFC支持……
QVGA (240x320, low density, small screen)
WQVGA400 (240x400, low density, normal screen)
WQVGA432 (240x432, low density, normal screen)
HVGA (320x480, medium density, normal screen)
WVGA800 (480x800, high density, normal screen)
WVGA854 (480x854 high density, normal screen)
WXGA720 (1280x720, extra-high density, normal screen)
WSVGA (1024x600, medium density, large screen)
WXGA (1280x800, medium density, xlarge screen)
我安装后发现模拟器增加了如下的内容很是欢喜啊!
现在甚至增加了一些类似机型的模拟器选择,要方便许多了!不过模拟器的速度依旧还是和真机相去甚远!
正题吧:
1、下载Android SDK starter package
http://www.cr173.com/soft/34565.html
用zip打开,拖出android-sdk 到你要放置的位置
2、下载Android SDK API Level
http://www.cr173.com/soft/40881.html
用zip打开,拖放 android-15(文件夹名字叫:android-4.0.4) 到 platforms 目录内
3、下载Android SDK 4.0.4 system img
http://www.cr173.com/soft/40882.html
进入android-sdk目录,
新建文件夹:system-images
再进入system-images目录,新建文件夹:android-15
用zip打开,拖放 armeabi-v7a 到system-images\android-15目录内
4、下载Android SDK Platform-tools
http://www.cr173.com/soft/40880.html
用zip打开,拖放 platform-tools 到 android-sdk目录内
基本相同了,就不再重复了,请按教程操作(下面的版本数字没有修改,但不影响安装)
照着以上步骤做完之后应该4.0就基本安装成功了,然后我还遇到如下的问题
这里不知道大家会遇到不,我也贴出来,万一遇到也可以照着解决一下
就是安装好了过后进入eclipse时会提示ADT版本不对,这个时候没有别的办法了,只有更新ADT
更新ADT的方法就是勾选Android SDK Manager中 TOOLS的内容然后点击install就可以了。
好啦,大致的方法就是这样啦!希望大家继续加油,研究新版本的功能和特性做出更好的android应用来服务大家。