My boss was looking at our SQL box, comparing the jobs list to the running
processes list. He noticed that the numbers are roughly analogous to each
other. He posed me the question, "do scheduled jobs stay in memory, or do
they release themselves when complete?"
I'm pretty sure the answer is that they release themselves, but I figured I
would bow to somebody from this group who had much more knowledge of the
matter.
Regards,
Scott
i don't know exactly what numbers you see in the job list.
if a job is running, you will see it in "current activity - process info"
to answer his question, more than likely that job (or at least pieces of it)
will stay in memory
some of its code may stay in the procedure cache.
some of its data may stay in the buffer cache.
sql server generally tries to keep everything in memory and only releases
things when it feels it's necessary.
Scott McNair wrote:
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott
|||Scott,
if you look at the "current activity" in EM under Management, in Process
Info you will find the process running. You can find that when the jobs are
not running, you will not have processes related to the jobs. Yes, when a
job finishes, it releases itself.
A task (a job, a QA query etc) can possibly spin off multiple processes, so
you may have more processes then your currently running task. This might be
the reason that you sometimes see a relation between the number of processes
and processes, but that is completely coincidental.
Quentin
"Scott McNair" <scott.mcnair@.sfmco.takethispartout.com> wrote in message
news:Xns94E688FF6C32Asfmco@.207.46.248.16...
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott
Showing posts with label numbers. Show all posts
Showing posts with label numbers. Show all posts
Thursday, March 29, 2012
Do scheduled jobs stay in memory?
My boss was looking at our SQL box, comparing the jobs list to the running
processes list. He noticed that the numbers are roughly analogous to each
other. He posed me the question, "do scheduled jobs stay in memory, or do
they release themselves when complete?"
I'm pretty sure the answer is that they release themselves, but I figured I
would bow to somebody from this group who had much more knowledge of the
matter.
Regards,
Scotti don't know exactly what numbers you see in the job list.
if a job is running, you will see it in "current activity - process info"
to answer his question, more than likely that job (or at least pieces of it)
will stay in memory
some of its code may stay in the procedure cache.
some of its data may stay in the buffer cache.
sql server generally tries to keep everything in memory and only releases
things when it feels it's necessary.
Scott McNair wrote:
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott|||Scott,
if you look at the "current activity" in EM under Management, in Process
Info you will find the process running. You can find that when the jobs are
not running, you will not have processes related to the jobs. Yes, when a
job finishes, it releases itself.
A task (a job, a QA query etc) can possibly spin off multiple processes, so
you may have more processes then your currently running task. This might be
the reason that you sometimes see a relation between the number of processes
and processes, but that is completely coincidental.
Quentin
"Scott McNair" <scott.mcnair@.sfmco.takethispartout.com> wrote in message
news:Xns94E688FF6C32Asfmco@.207.46.248.16...
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott
processes list. He noticed that the numbers are roughly analogous to each
other. He posed me the question, "do scheduled jobs stay in memory, or do
they release themselves when complete?"
I'm pretty sure the answer is that they release themselves, but I figured I
would bow to somebody from this group who had much more knowledge of the
matter.
Regards,
Scotti don't know exactly what numbers you see in the job list.
if a job is running, you will see it in "current activity - process info"
to answer his question, more than likely that job (or at least pieces of it)
will stay in memory
some of its code may stay in the procedure cache.
some of its data may stay in the buffer cache.
sql server generally tries to keep everything in memory and only releases
things when it feels it's necessary.
Scott McNair wrote:
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott|||Scott,
if you look at the "current activity" in EM under Management, in Process
Info you will find the process running. You can find that when the jobs are
not running, you will not have processes related to the jobs. Yes, when a
job finishes, it releases itself.
A task (a job, a QA query etc) can possibly spin off multiple processes, so
you may have more processes then your currently running task. This might be
the reason that you sometimes see a relation between the number of processes
and processes, but that is completely coincidental.
Quentin
"Scott McNair" <scott.mcnair@.sfmco.takethispartout.com> wrote in message
news:Xns94E688FF6C32Asfmco@.207.46.248.16...
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott
Do scheduled jobs stay in memory?
My boss was looking at our SQL box, comparing the jobs list to the running
processes list. He noticed that the numbers are roughly analogous to each
other. He posed me the question, "do scheduled jobs stay in memory, or do
they release themselves when complete?"
I'm pretty sure the answer is that they release themselves, but I figured I
would bow to somebody from this group who had much more knowledge of the
matter.
Regards,
Scotti don't know exactly what numbers you see in the job list.
if a job is running, you will see it in "current activity - process info"
to answer his question, more than likely that job (or at least pieces of it)
will stay in memory
some of its code may stay in the procedure cache.
some of its data may stay in the buffer cache.
sql server generally tries to keep everything in memory and only releases
things when it feels it's necessary.
Scott McNair wrote:
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott|||Scott,
if you look at the "current activity" in EM under Management, in Process
Info you will find the process running. You can find that when the jobs are
not running, you will not have processes related to the jobs. Yes, when a
job finishes, it releases itself.
A task (a job, a QA query etc) can possibly spin off multiple processes, so
you may have more processes then your currently running task. This might be
the reason that you sometimes see a relation between the number of processes
and processes, but that is completely coincidental.
Quentin
"Scott McNair" <scott.mcnair@.sfmco.takethispartout.com> wrote in message
news:Xns94E688FF6C32Asfmco@.207.46.248.16...
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott
processes list. He noticed that the numbers are roughly analogous to each
other. He posed me the question, "do scheduled jobs stay in memory, or do
they release themselves when complete?"
I'm pretty sure the answer is that they release themselves, but I figured I
would bow to somebody from this group who had much more knowledge of the
matter.
Regards,
Scotti don't know exactly what numbers you see in the job list.
if a job is running, you will see it in "current activity - process info"
to answer his question, more than likely that job (or at least pieces of it)
will stay in memory
some of its code may stay in the procedure cache.
some of its data may stay in the buffer cache.
sql server generally tries to keep everything in memory and only releases
things when it feels it's necessary.
Scott McNair wrote:
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott|||Scott,
if you look at the "current activity" in EM under Management, in Process
Info you will find the process running. You can find that when the jobs are
not running, you will not have processes related to the jobs. Yes, when a
job finishes, it releases itself.
A task (a job, a QA query etc) can possibly spin off multiple processes, so
you may have more processes then your currently running task. This might be
the reason that you sometimes see a relation between the number of processes
and processes, but that is completely coincidental.
Quentin
"Scott McNair" <scott.mcnair@.sfmco.takethispartout.com> wrote in message
news:Xns94E688FF6C32Asfmco@.207.46.248.16...
> My boss was looking at our SQL box, comparing the jobs list to the running
> processes list. He noticed that the numbers are roughly analogous to each
> other. He posed me the question, "do scheduled jobs stay in memory, or do
> they release themselves when complete?"
> I'm pretty sure the answer is that they release themselves, but I figured
I
> would bow to somebody from this group who had much more knowledge of the
> matter.
> Regards,
> Scott
Sunday, March 11, 2012
Division not returning whole numbers and not decimal values
I'm trying to divide 2 int columns and am expecting a result in a decimal
value, however, only whole values are being returned. First I tried
returning a calculated value from a select statement like this:
CREATE TABLE #tmp (col1 int, col2 int, TEST decimal(8,7))
INSERT INTO #tmp (col1, col2)
VALUES (7,5)
SELECT col2 / col1
FROM #tmp
But it returned zero. So then I tried to update the calculated value into a
decimal column but I got the same result.
UPDATE #tmp
SET TEST = col2 / col1
SELECT col1, col2, TEST FROM #tmp
Any help on this? THANKS!
moondaddy@.nospam.nospamYou've got to convert at least 1 of the values to a floating-point or decima
l
type first. e.g:
select 4 / 3 -- returns int
select convert(float, 4) / 3 -- returns float
"moondaddy" wrote:
> I'm trying to divide 2 int columns and am expecting a result in a decimal
> value, however, only whole values are being returned. First I tried
> returning a calculated value from a select statement like this:
>
> CREATE TABLE #tmp (col1 int, col2 int, TEST decimal(8,7))
> INSERT INTO #tmp (col1, col2)
> VALUES (7,5)
> SELECT col2 / col1
> FROM #tmp
> But it returned zero. So then I tried to update the calculated value into
a
> decimal column but I got the same result.
> UPDATE #tmp
> SET TEST = col2 / col1
> SELECT col1, col2, TEST FROM #tmp
> Any help on this? THANKS!
> --
> moondaddy@.nospam.nospam
>
>
value, however, only whole values are being returned. First I tried
returning a calculated value from a select statement like this:
CREATE TABLE #tmp (col1 int, col2 int, TEST decimal(8,7))
INSERT INTO #tmp (col1, col2)
VALUES (7,5)
SELECT col2 / col1
FROM #tmp
But it returned zero. So then I tried to update the calculated value into a
decimal column but I got the same result.
UPDATE #tmp
SET TEST = col2 / col1
SELECT col1, col2, TEST FROM #tmp
Any help on this? THANKS!
moondaddy@.nospam.nospamYou've got to convert at least 1 of the values to a floating-point or decima
l
type first. e.g:
select 4 / 3 -- returns int
select convert(float, 4) / 3 -- returns float
"moondaddy" wrote:
> I'm trying to divide 2 int columns and am expecting a result in a decimal
> value, however, only whole values are being returned. First I tried
> returning a calculated value from a select statement like this:
>
> CREATE TABLE #tmp (col1 int, col2 int, TEST decimal(8,7))
> INSERT INTO #tmp (col1, col2)
> VALUES (7,5)
> SELECT col2 / col1
> FROM #tmp
> But it returned zero. So then I tried to update the calculated value into
a
> decimal column but I got the same result.
> UPDATE #tmp
> SET TEST = col2 / col1
> SELECT col1, col2, TEST FROM #tmp
> Any help on this? THANKS!
> --
> moondaddy@.nospam.nospam
>
>
Division Calc in Column Returns 0's or 1's
I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
calculated in a previous grouped view (View1). The column in View2 that
devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
record... but they should be actual numbers instead.
The divide column in View2 looks like this: Number2 / Number 1
The SQL statement looks like this:
SELECT Number1, Number2, Number2 / Number1 AS Expr1
FROM dbo.View1
What do you think is going on? Is SQL Server getting the DataTypes mixed
up?
Thank You!!
Scott Buerkley
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95If your numbers are INTs then you're getting integer divisions. For
example:
SELECT 1/2
returns 0.
Try casting one of them to NUMERIC:
SELECT Number1, Number2, CAST(Number2 AS NUMERIC(10, 5)) / Number1 AS
Expr1
FROM dbo.View1
"Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
>calculated in a previous grouped view (View1). The column in View2 that
>devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
>record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95|||Hard to know for sure without DDL and sample data, but the most likely cause
is that Number1 and Number 2 are bot integer types (int or smallint, etc).
Then SQL does an integer divide and always returns an integer result.
Change one of them to a type which can have a decimal part (float, or
decimal, etc) before doing the divide, something like
SELECT Number1, Number2, (Cast Number2 As Float) / Number1 As Expr1
Tom
"Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
>calculated in a previous grouped view (View1). The column in View2 that
>devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
>record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95|||Scott Buerkley wrote:
> I am dividing 2 numbers in a view (View2). The 2 numbers we sums of numbe
r
> calculated in a previous grouped view (View1). The column in View2 that
> devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
> record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
>
You're dividing two integers, coming up with a fractional value, and SQL
is rounding it to return it as an integer.|||Yes, the 2 numbers were integers and this worked!!
Thx,
Scott Buerkley
"Mike C#" <xyz@.xyz.com> wrote in message
news:ODvlDeimGHA.464@.TK2MSFTNGP05.phx.gbl...
> If your numbers are INTs then you're getting integer divisions. For
> example:
> SELECT 1/2
> returns 0.
> Try casting one of them to NUMERIC:
> SELECT Number1, Number2, CAST(Number2 AS NUMERIC(10, 5)) / Number1 AS
> Expr1
> FROM dbo.View1
> "Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
> news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95|||Yes, you were all correct. The 2 numbers were integers.
It is working now. Thanks for your help!!
Thx,
Scott Buerkley
"Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
>calculated in a previous grouped view (View1). The column in View2 that
>devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
>record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95
calculated in a previous grouped view (View1). The column in View2 that
devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
record... but they should be actual numbers instead.
The divide column in View2 looks like this: Number2 / Number 1
The SQL statement looks like this:
SELECT Number1, Number2, Number2 / Number1 AS Expr1
FROM dbo.View1
What do you think is going on? Is SQL Server getting the DataTypes mixed
up?
Thank You!!
Scott Buerkley
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95If your numbers are INTs then you're getting integer divisions. For
example:
SELECT 1/2
returns 0.
Try casting one of them to NUMERIC:
SELECT Number1, Number2, CAST(Number2 AS NUMERIC(10, 5)) / Number1 AS
Expr1
FROM dbo.View1
"Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
>calculated in a previous grouped view (View1). The column in View2 that
>devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
>record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95|||Hard to know for sure without DDL and sample data, but the most likely cause
is that Number1 and Number 2 are bot integer types (int or smallint, etc).
Then SQL does an integer divide and always returns an integer result.
Change one of them to a type which can have a decimal part (float, or
decimal, etc) before doing the divide, something like
SELECT Number1, Number2, (Cast Number2 As Float) / Number1 As Expr1
Tom
"Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
>calculated in a previous grouped view (View1). The column in View2 that
>devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
>record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95|||Scott Buerkley wrote:
> I am dividing 2 numbers in a view (View2). The 2 numbers we sums of numbe
r
> calculated in a previous grouped view (View1). The column in View2 that
> devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
> record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
>
You're dividing two integers, coming up with a fractional value, and SQL
is rounding it to return it as an integer.|||Yes, the 2 numbers were integers and this worked!!
Thx,
Scott Buerkley
"Mike C#" <xyz@.xyz.com> wrote in message
news:ODvlDeimGHA.464@.TK2MSFTNGP05.phx.gbl...
> If your numbers are INTs then you're getting integer divisions. For
> example:
> SELECT 1/2
> returns 0.
> Try casting one of them to NUMERIC:
> SELECT Number1, Number2, CAST(Number2 AS NUMERIC(10, 5)) / Number1 AS
> Expr1
> FROM dbo.View1
> "Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
> news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95|||Yes, you were all correct. The 2 numbers were integers.
It is working now. Thanks for your help!!
Thx,
Scott Buerkley
"Scott Buerkley" <Scott@.ComputerRelief.ws> wrote in message
news:44a190a6$0$3253$a15e20c9@.news.newsgroupdirect.com...
>I am dividing 2 numbers in a view (View2). The 2 numbers we sums of number
>calculated in a previous grouped view (View1). The column in View2 that
>devieds 1 of the numbers by the other, returns either a 0 or a 1 for each
>record... but they should be actual numbers instead.
> The divide column in View2 looks like this: Number2 / Number 1
> The SQL statement looks like this:
> SELECT Number1, Number2, Number2 / Number1 AS Expr1
> FROM dbo.View1
> What do you think is going on? Is SQL Server getting the DataTypes mixed
> up?
> Thank You!!
> Scott Buerkley
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95
Subscribe to:
Posts (Atom)