新足迹

 找回密码
 注册

精华好帖回顾

· MT Wilsom 随拍 (2012-4-29) JerryWu · 可怕的产后抑郁症 (2011-2-28) cherry_melody
· 【把鲤鱼进行到底】——航航手把手教你做酸菜鱼 (2012-1-17) 航迹云 · 难忘的旅程(GREAT OCEAN ROAD&GRAMPIANS)-已加贴照片 (2005-10-10) patricb
Advertisement
Advertisement
楼主:招财猫

[IT] 请数据库高手帮忙(第4页updated) [复制链接]

发表于 2007-2-15 13:02 |显示全部楼层
此文章由 jl162401 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 jl162401 所有!转贴必须注明作者、出处和本声明,并保持内容完整
楼上果然好强,呵呵!
Advertisement
Advertisement

发表于 2007-2-15 13:14 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 招财猫 于 2007-2-15 13:20 发表


you reckon it's an index problem? it took only half hour transfering all data from source server to my pc (not a server) or to itself.


You didn't disable the index in the target server? It's the first thing you should do.

发表于 2007-2-15 13:30 |显示全部楼层
此文章由 江苏小伙子 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 江苏小伙子 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 招财猫 于 2007-2-15 14:01 发表


No, there's no anti-virus running on target server. Network admin just told me target server uses RAID 5, while source server uses RAID 10 & RAID 6.  Would it be the reason?


Are they both using hardware RAID? Source server has 2 disks controllers. I would reckon the log files and data files are seperated into different controllers. Target server has only one disk controller. Also RAID 5 is not a good choice for write-intensive environment, especially when data files, tempdb and log files are on the same disk group.

When you copy tables using the tool, will the tables in target DB be truncated before copying?

发表于 2007-2-15 14:06 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Yes, both server use RAID controller, and also all tables been truncated before the job running

[ 本帖最后由 招财猫 于 2007-2-15 15:20 编辑 ]

发表于 2007-2-15 14:21 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 jl162401 于 2007-2-15 14:02 发表
楼上果然好强,呵呵!


I totally agree with you.

发表于 2007-2-15 14:28 |显示全部楼层
此文章由 jl162401 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 jl162401 所有!转贴必须注明作者、出处和本声明,并保持内容完整
兄弟,你这个问题处理得怎么样了?
Advertisement
Advertisement

发表于 2007-2-15 14:35 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 jl162401 于 2007-2-15 15:28 发表
兄弟,你这个问题处理得怎么样了?


I hope I can work it out by next week...

发表于 2007-2-15 14:39 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Just got these from network admin, does it make any sense?

Server B (target server)
Single 3.4 Ghz Xeon CPU
2 Gb RAM memory
Hardware Raid 5
On board 6i controller
4 x 72 Gb 10k U320 disks

Server A (source server)
Dual 3.6 Ghz Xeon CPU
4 Gb Ram memory
Hardware raid 5
6400 controller
6 x 148 Gb 15k U320 disks

发表于 2007-2-15 15:01 |显示全部楼层
此文章由 Portal 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 Portal 所有!转贴必须注明作者、出处和本声明,并保持内容完整
关看硬件不行,让你们admin跑几个performance counter吧

发表于 2007-2-15 15:11 |显示全部楼层

Good luck

此文章由 江苏小伙子 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 江苏小伙子 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 招财猫 于 2007-2-15 15:39 发表
Just got these from network admin, does it make any sense?

Server B (target server)
Single 3.4 Ghz Xeon CPU
2 Gb RAM memory
Hardware Raid 5
On board 6i controller
4 x 72 Gb 10k U320 disks
...


Wish you can resolve this issue soon. Cannot believe your company buy a computer with less CPU and less RAM for BI application.
Anyway

<1>
Have you check system logs on target server? Any information there?
Besides database, what else big applications are installed on source and target servers? Are there much difference?
As for as OS services, do source server and target server run similar services? Are there much difference?

<2>
Please download the IO benchmark tool from Microsoft, install and post the results?
http://www.microsoft.com/downloa ... &displaylang=en

<3>
How about my query? Please run it in target DB
select
    [name],
    type_desc,
    space_used_in_kb = (page_count * 8.0),
    space_used_in_mb = (page_count * 8.0 / 1024.0)
from
    sys.indexes I inner join sys.dm_db_index_physical_stats(db_id(), object_id('.'), null, null, null) P
    on I.[object_id] = P.[object_id] and I.[index_id] = P.[index_id]

<4>
The raid configuration is different from previous post?

发表于 2007-2-15 15:11 |显示全部楼层
此文章由 jl162401 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 jl162401 所有!转贴必须注明作者、出处和本声明,并保持内容完整
从你这个配置上看,ServerA至少要比ServerB快4到6倍

内存小,硬盘转速慢,容量大,呵呵
Advertisement
Advertisement

发表于 2007-2-15 15:42 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 Portal 于 2007-2-15 16:01 发表
关看硬件不行,让你们admin跑几个performance counter吧


I don't think so.

It's should notbe  a hardware issue.

1 G is a small database.
I guess even with personal PC (with 512M RAM around), you can run the import very fast ( I guess normally not more than 30 Mins)

发表于 2007-2-15 15:52 |显示全部楼层
此文章由 jl162401 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 jl162401 所有!转贴必须注明作者、出处和本声明,并保持内容完整
就是,一定要从软件参数配置上找找原因,再烂也是个server啊

发表于 2007-2-15 16:05 |显示全部楼层
此文章由 江苏小伙子 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 江苏小伙子 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 jl162401 于 2007-2-15 16:52 发表
就是,一定要从软件参数配置上找找原因,再烂也是个server啊


It looks like.

And the server is Less powerful than my own PC. What a server!

发表于 2007-2-15 16:17 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 江苏小伙子 于 2007-2-15 17:05 发表


It looks like.

And the server is Less powerful than my own PC. What a server!



You PC is too strong

Any way, learn from your guys...hope you can solve the problem soon.

Because I am building a similar system with 15G data initiately. ( and will increase 5 G per year).

发表于 2007-2-16 09:01 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 jl162401 于 2007-2-15 16:52 发表
就是,一定要从软件参数配置上找找原因,再烂也是个server啊


How?
Advertisement
Advertisement

发表于 2007-2-16 09:12 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Wish you can resolve this issue soon. Cannot believe your company buy a computer with

less CPU and less RAM for BI application.

== Actually, source server A is a production server & target server B is a test server,

thus all applications installed on A is also installed on B, their software are totally

same. I ralised B would be slower than A, just cann't believe it can be slow like that --

takes ~7 hours to transfer 1 G data in the midnight when there's no any other application

or program running on the server.  

<1>
Have you check system logs on target server? Any information there?
Besides database, what else big applications are installed on source and target servers?

Are there much difference?
As for as OS services, do source server and target server run similar services? Are there

much difference?

== cann't see any error or warning in event log. Everything looks fine.

<2>
Please download the IO benchmark tool from Microsoft, install and post the results?
http://www.microsoft.com/downloa ... &displaylang=en

== I will post it shortly.

<3>
How about my query? Please run it in target DB
select
    [name],
    type_desc,
    space_used_in_kb = (page_count * 8.0),
    space_used_in_mb = (page_count * 8.0 / 1024.0)
from
    sys.indexes I inner join sys.dm_db_index_physical_stats(db_id(), object_id('.'),

null, null, null) P
    on I.[object_id] = P.[object_id] and I.[index_id] = P.[index_id]

== it returns ~1500 records, half of them are heap, combined with another half of

clustered index & non-clustered index.

<4>
The raid configuration is different from previous post?

== ignore the previous one please.

发表于 2007-2-16 09:23 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 goldensun 于 2007-2-15 17:17 发表



You PC is too strong

Any way, learn from your guys...hope you can solve the problem soon.

Because I am building a similar system with 15G data initiately. ( and will incr ...


Are you a DBA as well?

发表于 2007-2-16 09:39 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
I am Not DBA,

In the target server
How about the file size setting? ( I may set 2G as the initiate value)
How about the fill factor setting? ( I may want to set 80%)
How about the Auto Update Statistics ?You may change it and see how

发表于 2007-2-16 10:14 |显示全部楼层
此文章由 江苏小伙子 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 江苏小伙子 所有!转贴必须注明作者、出处和本声明,并保持内容完整
<3>
How about my query? Please run it in target DB
...
== it returns ~1500 records, half of them are heap, combined with another half of clustered index & non-clustered index.

==> Are these indexes in any chance related to the tables you copied?

发表于 2007-2-16 10:48 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 江苏小伙子 于 2007-2-16 11:14 发表
<3>
How about my query? Please run it in target DB
...
== it returns ~1500 records, half of them are heap, combined with another half of clustered index & non-clustered index.

==> ...


i think they are all related to.
Advertisement
Advertisement

发表于 2007-2-16 11:06 |显示全部楼层
此文章由 江苏小伙子 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 江苏小伙子 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 招财猫 于 2007-2-16 11:48 发表


i think they are all related to.


When you test by copying data from source DB to source DB or from source DB to your PC,
does your target DB (in this case, your source DB as well or your PC) have these indexes in the metadata?
If not, that could be the cause of your slow performance.

发表于 2007-2-16 11:42 |显示全部楼层

any luck from these output?

此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
-kw -t1 -s30 -b2 -i64 -bn
output:
IOs/sec:  3006.8
MBs/sec:     5.87

-kr -t1 -s30 -b2 -i64 -bn
output:
IOs/sec:  136.93
MBs/sec:    0.26

发表于 2007-2-16 12:00 |显示全部楼层
此文章由 江苏小伙子 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 江苏小伙子 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 招财猫 于 2007-2-16 12:42 发表
-kw -t1 -s30 -b2 -i64 -bn
output:
IOs/sec:  3006.8
MBs/sec:     5.87

-kr -t1 -s30 -b2 -i64 -bn
output:
IOs/sec:  136.93
MBs/sec:    0.26


Well this explains why one is much slower. That's almost 20 times slower.

Can you please on your target server check hardware manager, check the disk drives and find if write cache is disabled, if yes, please tick it to enable write cache?

[ 本帖最后由 江苏小伙子 于 2007-2-16 13:05 编辑 ]

发表于 2007-2-16 15:23 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
yes, it's unticked. however, I cannot tick it until get the permission from network admin who is away this afternoon.

发表于 2007-2-16 15:48 |显示全部楼层
此文章由 招财猫 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 招财猫 所有!转贴必须注明作者、出处和本声明,并保持内容完整
Thanks to all the replies. Although I've been struggling with this problem for the whole week, I learnt a lot of knowledge from this post & research as a reward.  Happy in hope & patient in pain, that's my one year's DBA experience.

Anyway, wish all of you guys have a nice weekend and happy chinese new year.
Advertisement
Advertisement

发表于 2007-2-16 15:59 |显示全部楼层
此文章由 典 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 典 所有!转贴必须注明作者、出处和本声明,并保持内容完整
learnt a lot

发表于 2007-2-16 17:29 |显示全部楼层
此文章由 草垛下的柴和鱼 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 草垛下的柴和鱼 所有!转贴必须注明作者、出处和本声明,并保持内容完整
原帖由 招财猫 于 2007-2-16 16:48 发表
Thanks to all the replies. Although I've been struggling with this problem for the whole week, I learnt a lot of knowledge from this post & research as a reward.  Happy in hope & patient in ...


Please let us know if "write cache" will fix your problem.

发表于 2007-2-16 21:59 |显示全部楼层
此文章由 tracy@syd 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 tracy@syd 所有!转贴必须注明作者、出处和本声明,并保持内容完整
我看到了真正的SQL Server高手啊,呵呵,强,江苏小伙子

评分

参与人数 1积分 +3 收起 理由
jl162401 + 3 我很赞同

查看全部评分

发表于 2007-2-16 22:54 |显示全部楼层
此文章由 seth2000 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 seth2000 所有!转贴必须注明作者、出处和本声明,并保持内容完整


学习。

[ 本帖最后由 seth2000 于 2007-2-17 00:04 编辑 ]

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Advertisement
Advertisement
返回顶部