C********r 发帖数: 145 | 1 Yesterday, the system constantly hang up due to database time out. The
solution was to recompile the timed out store procedure.
And then it was discovered there was a job in previous version to recompile
this store procedure regularly which got left out in the new version.
I wonder when do we need to recompile a store procedure? Can the DaNiu here
help to explain when we should expect to recompile a store procedure
regularly(when table structure/index not changing)? |
|
g***l 发帖数: 18555 | 2 sys.sp_replmonitorrefreshagentdata老在RECOMPILE,REPLICATION是从2005到2008
PUSH。现在RECOMPILE是25RECOMPILES/SEC PROCEDURE HIT RATE只有60% |
|
c**********e 发帖数: 2007 | 3 You have a class that many libraries depend on. Now you need to modify the
class for one application. Which of the following changes require
recompiling all libraries before it is safe to build the application?
a) add a constructor
b) add a data member
c) change destructor into virtual
d) add an argument with default value to an existing member function
This is an old question. I believe that it was discussed before. But I am
still not sure about its answer. |
|
z***y 发帖数: 7151 | 4 这个不奇怪啊。
你可以看一看那个procedure, 你看里面有几个对temp table 的改变, 这些数据的改
变都会触发
recompilation。
我这个版本是2008 SP2的。
create procedure sys.sp_replmonitorrefreshagentdata
as
begin
set nocount on
declare @retcode int
,@agent_id int
,@agent_id2 int
,@publisher_id int
,@xact_seqno varbinary(16)
,@logreader_latency int
,@publisher_db sysname
,@publication sysname
-- security check
-- Has to b... 阅读全帖 |
|
g***l 发帖数: 18555 | 5 昨天加了13个TABLE UPDATABLE TRANSACTIONAL REPLICATION,COMPILES/S就从昨天的
20跳到50了,CPU的USAGE也明显增加,到底什么在RECOMPILE,难道是REPLICATION自己
的SP?还是REPLICATION CALL的那些TRIGGERS |
|
B*****g 发帖数: 34098 | 6 最好注明一下是哪个版本,不同版本可能有区别
recompile
here |
|
s**********o 发帖数: 14359 | 7 通常SP是不需要经常RECOMPILE的,除非你的TABLE数据变化快,
一天添加删除几万几百万,怀疑还是你的INDEX没做好,一般的数据
一周REINDEX一次就可以了,RUN SP的EXECUTION PLAN就能看出来,
哪里少了INDEX,哪个INDEX上有问题 |
|
b***y 发帖数: 2799 | 8 ☆─────────────────────────────────────☆
Orage (Orage) 于 (Mon Nov 17 22:08:09 2008) 提到:
Input are several numbers, output is a data file. Weird thing is when I
change input numbers, the output data file doesn't change. I delete the old
output data file and re-run the program, still no change. What I should do
or how to recompile? I am really a weak hand. Thanks very ,much!
☆─────────────────────────────────────☆
EUV (O Hei B Hei M Hei P Hei) 于 (Mon Nov 17 22:09:23 2008) 提到:
你的问题没有人看得懂 |
|
X****r 发帖数: 3557 | 9 来自主题: Programming版 - 问个题。 The question is not clear enough. There are two way to define 'safe'
here:
1. The behavior of only recompiling the application without
recompiling the library is the same as recompiling everything.
2. The behavior of the library without recompiling when linked
together with the recompiled application is the same as the behavior
of the library before the change of the class.
The original question probably intended (2), but the language does
not explicitly refute (1), in which case none of the opt |
|
t****t 发帖数: 6806 | 10 这个问题的前提是, 你recompile你的程序, 而不是修改你的程序再recompile
如果你能recompile, 那说明你的程序里没有使用缺省的ctor.
如果你需要修改程序, 那无论如何你都需要recompile, 这个我认为不在讨论范围内了. |
|
s**9 发帖数: 207 | 11 我这么理解对不对。用个具体的例子来说:
Setting: C.h define a class C. C.c implements C. main.c includes C.h and
creates instances of C.
Question: If some changes are made to C.h. does recompiling main.c generate
a new main.o file?
如果这道题问的就是上面的情况,那么add data, change dtor to virtual会改变main
.o (所以需要recompile main.c). add a parameter with default value 也会改变
main.o (所以也需要recompile main.c). 这和上面thrust给的答案一致,但和lanti的
不一致?
add a constructor。有的情况main.c 不编译,有的时候编译但main.o会变,有的编译
且main.o不变。所以是否要recompile main.c 不定。
刚在精华区看到了这道题 |
|
b******g 发帖数: 81 | 12 If it is just one dynamic SQL, the recompile time is not an issue.
The thing is the design is using a cursor, looping through each record.
Inside the loop, there is the dynamic SQL (INSERT INTO). Then every time
calling the dynamic SQL in the loop, it is recompiled - the recompile time
will multiply the number of records.
For thousands of records, the performance might be acceptable, but for
millions level, it will be a big overhead. |
|
S*********r 发帖数: 42 | 13 C. I would say that.
Let's say in the ClassA.h file:
class A
{
A() {}
}
In the library's LibB.h:
class A;
class B
{
A *m_pA;
}
In the LibB.cpp
#include "ClassA.h"
void B::B()
{
m_pA = 0;
}
In other libraries Others.cpp, we have
#include "LibB.h"
....
In this case, such changes as a, b and d do not require recompiling other
libraries, though relinking is required. However, the change as c requires
recompiling all the dependent libraries since the virtual table is created.
c
recompiling |
|
T*******y 发帖数: 6523 | 14 Your feeling's right. This recompilation by the virtual journal itself may
not be so convincing, but if they can show that their recompilation renders
more circulations or citations of your papers, then you can make them say
that you are impacting the field.
Perhaps the best way is to ask this virtual journal's editor to explain this
concept of virtual journal and show some numbers, such as your papers'
downloads, etc to show your contribution to this field. Otherwise, if just
by this email, it ... 阅读全帖 |
|
r******y 发帖数: 3838 | 15 By Daniel Eran Dilger
Published: 05:35 PM EST (02:35 PM PST)
New Metro-style apps designed to run on Microsoft's forthcoming Windows 8
for tablets will copy Apple's App Store business model of charging a 30
percent fee from developers, allowing the potential for Microsoft to regain
control over software in segments it has lost to Apple's iTunes and Google
search.
At its BUILD conference with developers, Microsoft has made it clear that
while existing Windows 7 desktop apps will continue to move ... 阅读全帖 |
|
f**y 发帖数: 138 | 16 I tried 8i in RedHat before. It was a bit clumsy because the instruction
requested me to recompile the linux kernel.
How about 9i? Does it still need to recompile the kernel? |
|
C****n 发帖数: 2324 | 17 All right guys.
1. Const can not be changed, and can only be declared in the field
declaration.
i.e.: public const int i=5;
2. const automatically means static.
3. Readonly can be asigned in CONSTRUCTOR!
The real world concern:
Never declare a public field as CONST (static), use readonly
instead, which will save you from recompilation if the const in the underlying
library is
recompiled. Only use const with your private field.
Well, a better pratice is never declare public field.
The Count in Ar |
|
vn 发帖数: 6191 | 18 Some advantages of LINQ over sprocs:
1.Type safety: I think we all understand this.
2.Abstraction: This is especially true with LINQ-to-Entities. This
abstraction also allows the framework to add additional improvements that
you can easily take advantage of. PLINQ is an example of adding multi-
threading support to LINQ. Code changes are minimal to add this support. It
would be MUCH harder to do this data access code that simply calls sprocs.
3.Debugging support: I can use any .NET debugger to d... 阅读全帖 |
|
l*s 发帖数: 783 | 19 ☆─────────────────────────────────────☆
vn (jmj) 于 (Fri Oct 19 10:25:39 2012, 美东) 提到:
- 做很多view的操作吗?加index啥的不?还干神马其他的?
- 你们都把sql query写成stored procedure吗?前段时间好像就是在这个版上看到一
种观点就是用linq 这样在c#里面就可以改 比stored procedure方便。。。这个理解对
不对?
- 用其他的方式访问db 比如NHibernate 还有什么工具?
☆─────────────────────────────────────☆
vn (jmj) 于 (Mon Oct 22 09:57:38 2012, 美东) 提到:
脚踏实地的问题木人讨论 都跑到隔壁去吵架 唉
☆─────────────────────────────────────☆
NeverLearn (24K golden bear) 于 (Mon Oct 22 17:36:01 2012, 美东) 提到:
只要关联查询多了,... 阅读全帖 |
|
j****i 发帖数: 305 | 20 Thanks for the detailed explaination. It looks complicated, but it's
definitely worth checking out, e.g., Virtualbox. Sometimes I don't change
any header files, just comment out some statements in the .cpp file and
recompile using make, it didn't have any effect. Unless I remove some other
related *.o's and recompile. I don't have this issue on my laptop. So I'm a
bit pissed off by the cluster. By the way I'm also using ar and ranlib to
generate a library for all my object files.
The cluster tha |
|
t****t 发帖数: 6806 | 21 来自主题: Programming版 - 问个题。 i remember the questions being asked quite a few times here, we agreed none
of the answers are guaranteed to be safe. but i think originally the intenti
on is (2)(3)(4) as i remember the original question is which one does NOT re
quire recompile everything...when we had an explicit ctor defined, (1) indee
d does not require recompiling, in which case the original behaviour would b
e kept intact. |
|
a**********e 发帖数: 157 | 22
原因大概2个
1. 如果implementation也放在header file里,同时很多其他文件都要include这个文
件,会导致严重redundancy,同样的代码出现很多次。(在cpp preprocess后)
2. 如果在cpp文件改变implementation,而declaration(header file里)不变,只需
要recompile cpp file。否则,所有include这个文件的所有file都要recompile,很浪
费资源和时间。 |
|
b**********5 发帖数: 7881 | 23 来自主题: Programming版 - 我老版问我 我发现这个非常random啊。 根本就不知道有什么原则, 什么情况需要recompile,
什么情况不需要recompile。 如果link in 。lib, 是不是一定都要? |
|
k**********g 发帖数: 989 | 24
For example, text file parsing.
On the other hand, MATLAB has excellent Java interoperability. You can load
a Java class and use it with most of the MATLAB syntax.
http://www.mathworks.com/help/matlab/matlab_external/passing-da
Comparing the interop between MATLAB-Java and MATLAB-DotNet, MATLAB-Java is
slightly more stable. Case in point: MATLAB can unload all Java classes
without quitting MATLAB. This is important if you need to modify (recompile)
your Java code while running or debugging from... 阅读全帖 |
|
h**h 发帖数: 132 | 25 Maybe you can help me out,
this is the error message when I tried to start nmap as root
[root@photon ~]> nmap isdn
Starting nmap V. 2.12 by Fyodor (f****[email protected], www.insecure.org/nmap/)
pcap_open_live: /dev/lo0: No such file or directory
If you are on Linux and getting Socket type not supported, try modprobe af_packe
t or recompile your kernel with SOCK_PACKET enabled. If you are on bsd and gett
ing device not configured, you need to recompile your kernel with Berkeley Packe
t Filter support. |
|
q****e 发帖数: 3 | 26 请教了一些朋友,发现这样就行了:
(注意!!要recompile kernel, 要make sure原kernel备份到如/kernel.original,
若怕出问题可将你的所有东西备份,虽然理论上说即使新kernel不行,用原kernel也
能boot)
对FreeBSD:
1. cp /usr/src/sys/i386/conf/GENERIC MYNEWKERNEL
(若是alpha则是在/usr/src/sys/
alpha/conf/下)
2. 往MYNEWKERNEL中加:
options MAXDSIZ="(2048*1024*1024-1)"
options MAXSSIZ="(2048*1024*1024-1)"
options DFLDSIZ="(2048*1024*1024-1)"
注:Intelx86是32bit的, 只能支持到2G-1. alpha不知是否可更高。
3.按标准的kernel recompile and install的一套过程对MYNEWKERNEL做(即config
MYNEWKERNEL, make depend等等),然后重新boo |
|
M**8 发帖数: 25 | 27 How about changing MyClass from
class MyClass
{
public:
int x;
};
to
class MyClass
{
public:
MyClass() {x = 10; }
int x;
};
Do we need to recompile? Or put this question in a different way, can you
give an example that making a dtor virtual will trigger application to
recompile? |
|
M**8 发帖数: 25 | 28 How about changing MyClass from
class MyClass
{
public:
int x;
};
to
class MyClass
{
public:
MyClass() {x = 10; }
int x;
};
Do we need to recompile? Or put this question in a different way, can you
give an example that making a dtor virtual will trigger application to
recompile? |
|
s*****I 发帖数: 23 | 29 B
without recompiling, the object size will be inconsistent between libs.
It is a common problem in real world.
c
recompiling |
|
w******l 发帖数: 58 | 30 yes, i guess abcd all have their problems.
not sure what the problem means by need to recompile...
does it mean that there will be no link problems, or
does it mean that the program need to be recompiled to
give the correct result. |
|
m********0 发帖数: 2717 | 31
我觉得这取决于出题者到底想考察什么?我记得原体是不重新编译对建立在原LIB上的
程序安全与否。
如果重载变化,可能应用程序在新旧LIB上有不同的定义,而且旧应用程序会调用新添
加的重载函数,这就不安全了。 总之,看怎么理解题目了。 记得题目是问需不需要
recompile。而不是recompile能不能成功build。 |
|
z*******n 发帖数: 1034 | 32 http://www.informit.com/articles/printerfriendly/2211695
Introduction to "The Java Language Specification, Java SE 8 Edition"
By James Gosling, Gilad Bracha, Alex Buckley, Bill Joy, Guy L. Steele
Date: Jun 12, 2014
The Java® programming language is a general-purpose, concurrent, class-
based, object-oriented language. It is designed to be simple enough that
many programmers can achieve fluency in the language. The Java programming
language is related to C and C++ but is organized rather dif... 阅读全帖 |
|
|
w******l 发帖数: 58 | 34 【 以下文字转载自 Quant 讨论区 】
发信人: wiseseal (wiseseal), 信区: Quant
标 题: a c++ interview question
发信站: BBS 未名空间站 (Wed Oct 7 22:37:51 2009, 美东)
You have a class that many libraries depend on. Now you need to modify the c
lass for one application. Which of the following changes require recompiling
all libraries before it is safe to build the application?
a. add a constructor
b. add a data member
c. change destructor into virtual
d. add an argument with default value to an existing member function |
|
|
a****l 发帖数: 245 | 36 You have a class that many libraries depend on. Now you need to modify the
class for one application. Which of the following changes require
recompiling all libraries before it is safe to build the application?
a. add a constructor
b. add a data member
c. change destructor into virtual
d. add an argument with default value to an existing member function |
|
c****p 发帖数: 32 | 37 嗯,但是也可以从另一个方面来说不需要recompile.
如果已经explicitly 有了其他ctor,加入新的没有影响。
这个基本上是要重新compile,一个例外是加入原来的class本来就只是method的封装比
如:
class Methods
{
public:
staic void test1();
}
这样加入new member fields也没什么关系(但是如果client code有类似sizeof(
Methods)的就不行)
这个一定要重新compile.其他的例子都可以找到反例(虽然有点急转弯的意思),但是
因为dtor是一定要被用到的,如果原本的dtor变成virtual,那么client端整个调用过
程就变了。原来是:
$Class_Dtor();
变成virtual后变成了
pClass->vtbl[index_of_dtor]();
所以client端必须重新compile.
反例是如果这个member function根本就没用到:D |
|
d****i 发帖数: 4809 | 38 这道题貌似以前在哪儿见过,但是忘了答案是什么了,哪位帮忙看一下。
You have a class that many libraries depend on. Now you need to modify the
class for one application. Which of the following changes require
recompiling all libraries before it is safe to build the application?
a. add a constructor
b. add a data member
c. change destructor into virtual
d. add an argument with default value to an existing member function |
|
h*********e 发帖数: 56 | 39 In my opinion, a recompile is a must when the object size changes. B always
changes the size, C may change it, but not always.
For C, If there are already other virtual functions in the class, the size
will not change if destructor is changed to virtual, the library can still
call it statically. If the new virtual destructor is the only virtual
function in the class, there will be some v-pointer pointing to the virtual
function table; thus modifying the size.
Is this right? |
|
t**g 发帖数: 1164 | 40 You have a class that many libraries depend on. Now you need to modify the
class for one application. Which of the following changes require
recompiling all libraries before it is safe to build the application?
a. add a constructor
b. add a data member
c. change destructor into virtual
d. add an argument with default value to an existing member function
我选的是b,c
理由是它们会改变class的size
请问是对的么
谢谢! |
|
B*****t 发帖数: 335 | 41 my answer is bcd require recompiling, a depends.
function |
|
m*******i 发帖数: 370 | 42 弱弱的问,为啥增加data member要recompile啊?已经存在的client program肯定没有
用这个data member的啊。 |
|
B*****t 发帖数: 335 | 43 <>第一章讲的很明白,主要是C++没有定义二进制层面上的封装。
比如class A的大小是4byte,你又增加了4byte,如果不recompile,这增加的4byte在
你的code很可能属于其他object所拥有。如果你继续使用这个类,而这个类又会对这新
增的4byte进行写操作,很显然会破坏你原有的code。
大部分情况下runtime error! |
|
d**e 发帖数: 6098 | 44 应该是要recompile一次,因为spec要改,body也要改。
重新编译一次也不算麻烦吧? |
|
|
t*****j 发帖数: 1105 | 46 选c是因为会改变其他子类的vtable,所以要重编译,对吗? |
|
|
|