Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Thursday, March 29, 2012

Filter by values from outer list region

Hello,
I am creating a report where I am using a list region to create report pages
with a few tables and graphs on each page. The dataset for the list region
contains categories of the values i want do display in the tables and
charts. The tables and charts have their own datasets, which all should be
filtered based on the category from the list region. Which changes from page
to page.
My problem is that I don't see how the inner tables and charts can be
filtered by the value of the list region?
Many thanks in advance for any help on this.
Best regards,
VemundHi Vemund Haga,
Thanks for your post.
From your descriptions, I understood that you would like to create Report
Pages dynamically. However, I am not very sure about what you want the
pages depend on, is it possible for your to generate some database sample
scripts and send a sample RDL files to me. Would you please share me more
detailed about the whole process? I would love to reproduce it on my side,
which I believe, will make us closer and quicker to the resolution.
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!|||Hi Vemund Haga,
I haven't heard back from you yet and I'm just writing in to see if you
have had an opportunity to collect the information. If you could get back
to me at your earliest convenience, we will be able to go ahead. If there
was some part of my post that you didn't understand, please feel free to
post here. I look forward to hearing from you.
Sincerely yours,
Michael Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---
Get Secure! - http://www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!

Tuesday, March 27, 2012

filling gridview from code

hello, i'd need a little help with filling GridViews

i browsed over like 10 search pages, but couldnt find any which would solve my problem.

so in my ajax project i made a testing page pulled a gridview (GridView1) on it with a fhew buttons and textboxes.
i need to fill the gv from code so my websie.asp.cs looks like this

 
1protected void Page_Load(object sender, EventArgs e)
2 {
3
4
5string connstr ="Data Source=.;database=teszt;user id=user;password=pass";
6 SqlConnection conn =new SqlConnection(connstr);
7 SqlCommand comm =new SqlCommand("select * from users", conn);
8 conn.Open();
9 SqlDataReader reader;
10 reader = comm.ExecuteReader();
11if (reader.HasRows)
12 {
13 GridView1.DataSource = reader;
14 GridView1.DataBind();
15 }
16 reader.Close();
17 conn.Close();
18 comm.Dispose();
19 }

so i load the page and there's no gridview on the page at all, nor an error msg, the connection and the database/table is fine.
any suggestions on what am i doing wrong? and i also like to know if there would be any problem with using this on a tabcontrol/tab
thankyou 


you have bind the data reader.

you have to bind the datasource like datatable or dataset or some list or collection.

That's the problem why you didn't see the grid data.

|||

ahh yes thankyou, i knwer there was smething wrong with that, so i managed the code from msdn, tho the GridView needs to be set to generate cols true

1protected void Page_Load(object sender, EventArgs e)
2 {
3// This example uses Microsoft SQL Server and connects
4 // to the Northwind sample database. The data source needs
5 // to be bound to the GridView control only when the
6 // page is first loaded. Thereafter, the values are
7 // stored in view state.
8if(!IsPostBack)
9 {
10
11// Declare the query string.
12 String queryString =
13"Select * From [users]";
14
15// Run the query and bind the resulting DataSet
16 // to the GridView control.
17 DataSet ds = GetData(queryString);
18if (ds.Tables.Count > 0)
19 {
20 GridView1.DataSource = ds;
21 GridView1.DataBind();
22 }
23else
24 {
25 Response.Write("Unable to connect to the database.");
26 }
27
28 }
29
30 }
31
32 DataSet GetData(String queryString)
33 {
34
35// Retrieve the connection string stored in the Web.config file.
36 String connectionString ="Data Source=.;database=teszt;user id=user;password=pass";
37
38 DataSet ds =new DataSet();
39
40try
41 {
42// Connect to the database and run the query.
43 SqlConnection connection =new SqlConnection(connectionString);
44 SqlDataAdapter adapter =new SqlDataAdapter(queryString, connection);
45
46// Fill the DataSet.
47 adapter.Fill(ds);
48
49 }
50catch(Exception ex)
51 {
52
53// The connection failed. Display an error message.
54 Response.Write("Unable to connect to the database.");
55
56 }
57
58return ds;
|||

one more thing tho, on this page i have a hidden table which contains 2 textboxes and a button, this visibility is also controlled by a button.
so the input fields are for inserting data to the table which the gridview is showing and when i hit the button to execute the insert i want the gridview to be updated so i put a GridView1.DataBind() in my input buttons final things to do, but what happens is after the postback the gridview is gonne. now what is up with that? does it forget its source?

FillFactor on Clustered Index

I have a clustered index which is created on an Identity column.
Let's say it has 10,000 pages and each row is about 200 bytes.
Each day about 1,000 rows are inserted.
Is there a formula that or method to determine the optimal FillFactor?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
Hi
Ok each day it insterts 1000 rows are pretty small amount of data. What
about reading the data? I suggets you haveing 90 for FILLFACTOR.
"cbrichards via droptable.com" <u3288@.uwe> wrote in message
news:76a76d9a857ab@.uwe...
>I have a clustered index which is created on an Identity column.
> Let's say it has 10,000 pages and each row is about 200 bytes.
> Each day about 1,000 rows are inserted.
> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
>
|||Since you didn't mention anything about what non-clustered indexes you have (if any) I assume that
you are interested in possible fragmentation in the leaf level of your clustered index (i.e., your
data). You say it is an identity column. Assuming your inserts don't specify a value for the
identity column (sing SET IDENTITY_INSERT), something rarely done, then each row you insert goes to
the end of the clustered index. This mean that you will have no page splits and can leave the
fillfactor to default value (100 percent full).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via droptable.com" <u3288@.uwe> wrote in message news:76a76d9a857ab@.uwe...
>I have a clustered index which is created on an Identity column.
> Let's say it has 10,000 pages and each row is about 200 bytes.
> Each day about 1,000 rows are inserted.
> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
>
|||Yes Tibor is 100% correct since the clustered index is on an identity
column. But even if it wasn't there is no easy formula per say to determine
the fill factor. It depends a LOT on the values inserted and in what order.
Without any other info you can usually start with 85 or 90 and then watch it
for a while and go from there.
Andrew J. Kelly SQL MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23lgHogk3HHA.3916@.TK2MSFTNGP02.phx.gbl...
> Since you didn't mention anything about what non-clustered indexes you
> have (if any) I assume that you are interested in possible fragmentation
> in the leaf level of your clustered index (i.e., your data). You say it is
> an identity column. Assuming your inserts don't specify a value for the
> identity column (sing SET IDENTITY_INSERT), something rarely done, then
> each row you insert goes to the end of the clustered index. This mean that
> you will have no page splits and can leave the fillfactor to default value
> (100 percent full).
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "cbrichards via droptable.com" <u3288@.uwe> wrote in message
> news:76a76d9a857ab@.uwe...
>
|||Thanks Tibor.
I do have non-clustered indexes on this table too, and the inserts will
rarely use SET IDENTITY_INSERT, they [the inserts] will all be done at the
end of the clustered index. Along with the inserts, there will also be
UPDATES and DELETES.
Would it still make sense to set the clustered index FILLFACTOR at or near
100? Or do the UPDATES and DELETES cause a need for the clustered index
FILLFACTOR to leave more available space on the page?
Tibor Karaszi wrote:[vbcol=seagreen]
>Since you didn't mention anything about what non-clustered indexes you have (if any) I assume that
>you are interested in possible fragmentation in the leaf level of your clustered index (i.e., your
>data). You say it is an identity column. Assuming your inserts don't specify a value for the
>identity column (sing SET IDENTITY_INSERT), something rarely done, then each row you insert goes to
>the end of the clustered index. This mean that you will have no page splits and can leave the
>fillfactor to default value (100 percent full).
>[quoted text clipped - 3 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
|||As for UPDATE, you cannot change the identity column value with an UPDATE, so and update cannot
cause the row to "move" (for a cl ix over the identity column).
As for DELETE, well it will cause "holes". End result is that the pages aren't as full as they could
be. In the end, you end up with more pages that you would needed. This is easy to see using DBCC
SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebuild the clustered index.
But there's no use to leave empty room on the pages since we already determined that you don't get
external fragmentation over such index.
Note that we have discussed an (clustered) index over an identity column. The table can have other
NC indexes, over other column combinations. And those B-trees will of course have different
fragmentation chacteristica.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via droptable.com" <u3288@.uwe> wrote in message news:76b38ca86d53a@.uwe...
> Thanks Tibor.
> I do have non-clustered indexes on this table too, and the inserts will
> rarely use SET IDENTITY_INSERT, they [the inserts] will all be done at the
> end of the clustered index. Along with the inserts, there will also be
> UPDATES and DELETES.
> Would it still make sense to set the clustered index FILLFACTOR at or near
> 100? Or do the UPDATES and DELETES cause a need for the clustered index
> FILLFACTOR to leave more available space on the page?
> Tibor Karaszi wrote:
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
>
|||Just to be clear on what you are saying, as we are now getting to close to
the final answer of my question regarding the FILLFACTOR on clustered indexes
over an identity column. If I have a clustered index over an identity column,
I can be confident in giving such an index a FILLFACTOR of 100, since we only
perform INSERTS, and DELETEs are very rare? And the UPDATES, even though they
might effect the non-clustered indexes, they will have no effect on the
clustered index?
Tibor Karaszi wrote:[vbcol=seagreen]
>As for UPDATE, you cannot change the identity column value with an UPDATE, so and update cannot
>cause the row to "move" (for a cl ix over the identity column).
>As for DELETE, well it will cause "holes". End result is that the pages aren't as full as they could
>be. In the end, you end up with more pages that you would needed. This is easy to see using DBCC
>SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebuild the clustered index.
>But there's no use to leave empty room on the pages since we already determined that you don't get
>external fragmentation over such index.
>Note that we have discussed an (clustered) index over an identity column. The table can have other
>NC indexes, over other column combinations. And those B-trees will of course have different
>fragmentation chacteristica.
>[quoted text clipped - 20 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
|||Very close. One situation that can occur is that an UPDATE result in the new row don't fit on the
current page (say you change a column value from something small to something big). SQL Server would
now need to split this page and link in a new page in the linked list. Then move 50% of the rows
from the old page to the new page and the row now fit on either of these pages. The end result is
... external fragmentation. How frequent this will occur, I can't say, of course. Possibly, or even
probably not frequent enough to worry about. But if you are worried about it, I suggest to start
with 100% and then monitor fragmentation level for the cl index to see if fragmentation increases
over time.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via droptable.com" <u3288@.uwe> wrote in message news:76bc0008d16b1@.uwe...
> Just to be clear on what you are saying, as we are now getting to close to
> the final answer of my question regarding the FILLFACTOR on clustered indexes
> over an identity column. If I have a clustered index over an identity column,
> I can be confident in giving such an index a FILLFACTOR of 100, since we only
> perform INSERTS, and DELETEs are very rare? And the UPDATES, even though they
> might effect the non-clustered indexes, they will have no effect on the
> clustered index?
> Tibor Karaszi wrote:
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server/200708/1
>
|||Are you meaning an UPDATE on the clustered index itself, such as an Identity
Insert that updates the identity column the clustered index is created off of,
or are you talking about an UPDATE on one of the non-clustered indexes?
Tibor Karaszi wrote:[vbcol=seagreen]
>Very close. One situation that can occur is that an UPDATE result in the new row don't fit on the
>current page (say you change a column value from something small to something big). SQL Server would
>now need to split this page and link in a new page in the linked list. Then move 50% of the rows
>from the old page to the new page and the row now fit on either of these pages. The end result is
>... external fragmentation. How frequent this will occur, I can't say, of course. Possibly, or even
>probably not frequent enough to worry about. But if you are worried about it, I suggest to start
>with 100% and then monitor fragmentation level for the cl index to see if fragmentation increases
>over time.
>[quoted text clipped - 24 lines]
Message posted via http://www.droptable.com
|||If you update any variable length column with a value larger than it was
originally you run the risk of a page split. Since the row will be larger
overall than it was before the update you may not have enough room on the
page if it was 100% (or close to it) full to begin with to hold the revised
row. So this does not have to be on a column with an index, just any
variable length column.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"cbrichards via droptable.com" <u3288@.uwe> wrote in message
news:76cc88bc95e2b@.uwe...
> Are you meaning an UPDATE on the clustered index itself, such as an
> Identity
> Insert that updates the identity column the clustered index is created off
> of,
> or are you talking about an UPDATE on one of the non-clustered indexes?
> Tibor Karaszi wrote:
> --
> Message posted via http://www.droptable.com
>

FillFactor on Clustered Index

I have a clustered index which is created on an Identity column.
Let's say it has 10,000 pages and each row is about 200 bytes.
Each day about 1,000 rows are inserted.
Is there a formula that or method to determine the optimal FillFactor?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200708/1Hi
Ok each day it insterts 1000 rows are pretty small amount of data. What
about reading the data? I suggets you haveing 90 for FILLFACTOR.
"cbrichards via droptable.com" <u3288@.uwe> wrote in message
news:76a76d9a857ab@.uwe...
>I have a clustered index which is created on an Identity column.
> Let's say it has 10,000 pages and each row is about 200 bytes.
> Each day about 1,000 rows are inserted.
> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200708/1
>|||Since you didn't mention anything about what non-clustered indexes you have
(if any) I assume that
you are interested in possible fragmentation in the leaf level of your clust
ered index (i.e., your
data). You say it is an identity column. Assuming your inserts don't specify
a value for the
identity column (sing SET IDENTITY_INSERT), something rarely done, then each
row you insert goes to
the end of the clustered index. This mean that you will have no page splits
and can leave the
fillfactor to default value (100 percent full).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via droptable.com" <u3288@.uwe> wrote in message news:76a76d9a857ab@.uwe...[vbcol
=seagreen]
>I have a clustered index which is created on an Identity column.
> Let's say it has 10,000 pages and each row is about 200 bytes.
> Each day about 1,000 rows are inserted.
> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200708/1
>[/vbcol]|||Yes Tibor is 100% correct since the clustered index is on an identity
column. But even if it wasn't there is no easy formula per say to determine
the fill factor. It depends a LOT on the values inserted and in what order.
Without any other info you can usually start with 85 or 90 and then watch it
for a while and go from there.
Andrew J. Kelly SQL MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23lgHogk3HHA.3916@.TK2MSFTNGP02.phx.gbl...
> Since you didn't mention anything about what non-clustered indexes you
> have (if any) I assume that you are interested in possible fragmentation
> in the leaf level of your clustered index (i.e., your data). You say it is
> an identity column. Assuming your inserts don't specify a value for the
> identity column (sing SET IDENTITY_INSERT), something rarely done, then
> each row you insert goes to the end of the clustered index. This mean that
> you will have no page splits and can leave the fillfactor to default value
> (100 percent full).
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "cbrichards via droptable.com" <u3288@.uwe> wrote in message
> news:76a76d9a857ab@.uwe...
>|||Thanks Tibor.
I do have non-clustered indexes on this table too, and the inserts will
rarely use SET IDENTITY_INSERT, they [the inserts] will all be done at t
he
end of the clustered index. Along with the inserts, there will also be
UPDATES and DELETES.
Would it still make sense to set the clustered index FILLFACTOR at or near
100? Or do the UPDATES and DELETES cause a need for the clustered index
FILLFACTOR to leave more available space on the page?
Tibor Karaszi wrote:[vbcol=seagreen]
>Since you didn't mention anything about what non-clustered indexes you have
(if any) I assume that
>you are interested in possible fragmentation in the leaf level of your clus
tered index (i.e., your
>data). You say it is an identity column. Assuming your inserts don't specif
y a value for the
>identity column (sing SET IDENTITY_INSERT), something rarely done, then eac
h row you insert goes to
>the end of the clustered index. This mean that you will have no page splits
and can leave the
>fillfactor to default value (100 percent full).
>
>[quoted text clipped - 3 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200708/1|||As for UPDATE, you cannot change the identity column value with an UPDATE, s
o and update cannot
cause the row to "move" (for a cl ix over the identity column).
As for DELETE, well it will cause "holes". End result is that the pages aren
't as full as they could
be. In the end, you end up with more pages that you would needed. This is ea
sy to see using DBCC
SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebui
ld the clustered index.
But there's no use to leave empty room on the pages since we already determi
ned that you don't get
external fragmentation over such index.
Note that we have discussed an (clustered) index over an identity column. Th
e table can have other
NC indexes, over other column combinations. And those B-trees will of course
have different
fragmentation chacteristica.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via droptable.com" <u3288@.uwe> wrote in message news:76b38ca86d53a@.uwe...[vbcol
=seagreen]
> Thanks Tibor.
> I do have non-clustered indexes on this table too, and the inserts will
> rarely use SET IDENTITY_INSERT, they [the inserts] will all be done at
the
> end of the clustered index. Along with the inserts, there will also be
> UPDATES and DELETES.
> Would it still make sense to set the clustered index FILLFACTOR at or near
> 100? Or do the UPDATES and DELETES cause a need for the clustered index
> FILLFACTOR to leave more available space on the page?
> Tibor Karaszi wrote:
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200708/1
>[/vbcol]|||Just to be clear on what you are saying, as we are now getting to close to
the final answer of my question regarding the FILLFACTOR on clustered indexe
s
over an identity column. If I have a clustered index over an identity column
,
I can be confident in giving such an index a FILLFACTOR of 100, since we onl
y
perform INSERTS, and DELETEs are very rare? And the UPDATES, even though the
y
might effect the non-clustered indexes, they will have no effect on the
clustered index?
Tibor Karaszi wrote:[vbcol=seagreen]
>As for UPDATE, you cannot change the identity column value with an UPDATE,
so and update cannot
>cause the row to "move" (for a cl ix over the identity column).
>As for DELETE, well it will cause "holes". End result is that the pages are
n't as full as they could
>be. In the end, you end up with more pages that you would needed. This is e
asy to see using DBCC
>SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebu
ild the clustered index.
>But there's no use to leave empty room on the pages since we already determ
ined that you don't get
>external fragmentation over such index.
>Note that we have discussed an (clustered) index over an identity column. T
he table can have other
>NC indexes, over other column combinations. And those B-trees will of cours
e have different
>fragmentation chacteristica.
>
>[quoted text clipped - 20 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200708/1|||Very close. One situation that can occur is that an UPDATE result in the new
row don't fit on the
current page (say you change a column value from something small to somethin
g big). SQL Server would
now need to split this page and link in a new page in the linked list. Then
move 50% of the rows
from the old page to the new page and the row now fit on either of these pag
es. The end result is
... external fragmentation. How frequent this will occur, I can't say, of c
ourse. Possibly, or even
probably not frequent enough to worry about. But if you are worried about it
, I suggest to start
with 100% and then monitor fragmentation level for the cl index to see if fr
agmentation increases
over time.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via droptable.com" <u3288@.uwe> wrote in message news:76bc0008d16b1@.uwe...[vbcol
=seagreen]
> Just to be clear on what you are saying, as we are now getting to close to
> the final answer of my question regarding the FILLFACTOR on clustered inde
xes
> over an identity column. If I have a clustered index over an identity colu
mn,
> I can be confident in giving such an index a FILLFACTOR of 100, since we o
nly
> perform INSERTS, and DELETEs are very rare? And the UPDATES, even though t
hey
> might effect the non-clustered indexes, they will have no effect on the
> clustered index?
> Tibor Karaszi wrote:
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200708/1
>[/vbcol]|||Are you meaning an UPDATE on the clustered index itself, such as an Identity
Insert that updates the identity column the clustered index is created off o
f,
or are you talking about an UPDATE on one of the non-clustered indexes?
Tibor Karaszi wrote:[vbcol=seagreen]
>Very close. One situation that can occur is that an UPDATE result in the ne
w row don't fit on the
>current page (say you change a column value from something small to somethi
ng big). SQL Server would
>now need to split this page and link in a new page in the linked list. Then
move 50% of the rows
>from the old page to the new page and the row now fit on either of these pa
ges. The end result is
>... external fragmentation. How frequent this will occur, I can't say, of c
ourse. Possibly, or even
>probably not frequent enough to worry about. But if you are worried about i
t, I suggest to start
>with 100% and then monitor fragmentation level for the cl index to see if f
ragmentation increases
>over time.
>
>[quoted text clipped - 24 lines]
Message posted via http://www.droptable.com|||If you update any variable length column with a value larger than it was
originally you run the risk of a page split. Since the row will be larger
overall than it was before the update you may not have enough room on the
page if it was 100% (or close to it) full to begin with to hold the revised
row. So this does not have to be on a column with an index, just any
variable length column.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"cbrichards via droptable.com" <u3288@.uwe> wrote in message
news:76cc88bc95e2b@.uwe...
> Are you meaning an UPDATE on the clustered index itself, such as an
> Identity
> Insert that updates the identity column the clustered index is created off
> of,
> or are you talking about an UPDATE on one of the non-clustered indexes?
> Tibor Karaszi wrote:
> --
> Message posted via http://www.droptable.com
>sql

Monday, March 26, 2012

FillFactor on Clustered Index

I have a clustered index which is created on an Identity column.
Let's say it has 10,000 pages and each row is about 200 bytes.
Each day about 1,000 rows are inserted.
Is there a formula that or method to determine the optimal FillFactor?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1Hi
Ok each day it insterts 1000 rows are pretty small amount of data. What
about reading the data? I suggets you haveing 90 for FILLFACTOR.
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message
news:76a76d9a857ab@.uwe...
>I have a clustered index which is created on an Identity column.
> Let's say it has 10,000 pages and each row is about 200 bytes.
> Each day about 1,000 rows are inserted.
> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1
>|||Since you didn't mention anything about what non-clustered indexes you have (if any) I assume that
you are interested in possible fragmentation in the leaf level of your clustered index (i.e., your
data). You say it is an identity column. Assuming your inserts don't specify a value for the
identity column (sing SET IDENTITY_INSERT), something rarely done, then each row you insert goes to
the end of the clustered index. This mean that you will have no page splits and can leave the
fillfactor to default value (100 percent full).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message news:76a76d9a857ab@.uwe...
>I have a clustered index which is created on an Identity column.
> Let's say it has 10,000 pages and each row is about 200 bytes.
> Each day about 1,000 rows are inserted.
> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1
>|||Yes Tibor is 100% correct since the clustered index is on an identity
column. But even if it wasn't there is no easy formula per say to determine
the fill factor. It depends a LOT on the values inserted and in what order.
Without any other info you can usually start with 85 or 90 and then watch it
for a while and go from there.
--
Andrew J. Kelly SQL MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23lgHogk3HHA.3916@.TK2MSFTNGP02.phx.gbl...
> Since you didn't mention anything about what non-clustered indexes you
> have (if any) I assume that you are interested in possible fragmentation
> in the leaf level of your clustered index (i.e., your data). You say it is
> an identity column. Assuming your inserts don't specify a value for the
> identity column (sing SET IDENTITY_INSERT), something rarely done, then
> each row you insert goes to the end of the clustered index. This mean that
> you will have no page splits and can leave the fillfactor to default value
> (100 percent full).
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message
> news:76a76d9a857ab@.uwe...
>>I have a clustered index which is created on an Identity column.
>> Let's say it has 10,000 pages and each row is about 200 bytes.
>> Each day about 1,000 rows are inserted.
>> Is there a formula that or method to determine the optimal FillFactor?
>> --
>> Message posted via SQLMonster.com
>> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1
>|||Thanks Tibor.
I do have non-clustered indexes on this table too, and the inserts will
rarely use SET IDENTITY_INSERT, they [the inserts] will all be done at the
end of the clustered index. Along with the inserts, there will also be
UPDATES and DELETES.
Would it still make sense to set the clustered index FILLFACTOR at or near
100? Or do the UPDATES and DELETES cause a need for the clustered index
FILLFACTOR to leave more available space on the page?
Tibor Karaszi wrote:
>Since you didn't mention anything about what non-clustered indexes you have (if any) I assume that
>you are interested in possible fragmentation in the leaf level of your clustered index (i.e., your
>data). You say it is an identity column. Assuming your inserts don't specify a value for the
>identity column (sing SET IDENTITY_INSERT), something rarely done, then each row you insert goes to
>the end of the clustered index. This mean that you will have no page splits and can leave the
>fillfactor to default value (100 percent full).
>>I have a clustered index which is created on an Identity column.
>[quoted text clipped - 3 lines]
>> Is there a formula that or method to determine the optimal FillFactor?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1|||As for UPDATE, you cannot change the identity column value with an UPDATE, so and update cannot
cause the row to "move" (for a cl ix over the identity column).
As for DELETE, well it will cause "holes". End result is that the pages aren't as full as they could
be. In the end, you end up with more pages that you would needed. This is easy to see using DBCC
SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebuild the clustered index.
But there's no use to leave empty room on the pages since we already determined that you don't get
external fragmentation over such index.
Note that we have discussed an (clustered) index over an identity column. The table can have other
NC indexes, over other column combinations. And those B-trees will of course have different
fragmentation chacteristica.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message news:76b38ca86d53a@.uwe...
> Thanks Tibor.
> I do have non-clustered indexes on this table too, and the inserts will
> rarely use SET IDENTITY_INSERT, they [the inserts] will all be done at the
> end of the clustered index. Along with the inserts, there will also be
> UPDATES and DELETES.
> Would it still make sense to set the clustered index FILLFACTOR at or near
> 100? Or do the UPDATES and DELETES cause a need for the clustered index
> FILLFACTOR to leave more available space on the page?
> Tibor Karaszi wrote:
>>Since you didn't mention anything about what non-clustered indexes you have (if any) I assume that
>>you are interested in possible fragmentation in the leaf level of your clustered index (i.e., your
>>data). You say it is an identity column. Assuming your inserts don't specify a value for the
>>identity column (sing SET IDENTITY_INSERT), something rarely done, then each row you insert goes
>>to
>>the end of the clustered index. This mean that you will have no page splits and can leave the
>>fillfactor to default value (100 percent full).
>>I have a clustered index which is created on an Identity column.
>>[quoted text clipped - 3 lines]
>> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1
>|||Just to be clear on what you are saying, as we are now getting to close to
the final answer of my question regarding the FILLFACTOR on clustered indexes
over an identity column. If I have a clustered index over an identity column,
I can be confident in giving such an index a FILLFACTOR of 100, since we only
perform INSERTS, and DELETEs are very rare? And the UPDATES, even though they
might effect the non-clustered indexes, they will have no effect on the
clustered index?
Tibor Karaszi wrote:
>As for UPDATE, you cannot change the identity column value with an UPDATE, so and update cannot
>cause the row to "move" (for a cl ix over the identity column).
>As for DELETE, well it will cause "holes". End result is that the pages aren't as full as they could
>be. In the end, you end up with more pages that you would needed. This is easy to see using DBCC
>SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebuild the clustered index.
>But there's no use to leave empty room on the pages since we already determined that you don't get
>external fragmentation over such index.
>Note that we have discussed an (clustered) index over an identity column. The table can have other
>NC indexes, over other column combinations. And those B-trees will of course have different
>fragmentation chacteristica.
>> Thanks Tibor.
>[quoted text clipped - 20 lines]
>> Is there a formula that or method to determine the optimal FillFactor?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1|||Very close. One situation that can occur is that an UPDATE result in the new row don't fit on the
current page (say you change a column value from something small to something big). SQL Server would
now need to split this page and link in a new page in the linked list. Then move 50% of the rows
from the old page to the new page and the row now fit on either of these pages. The end result is
... external fragmentation. How frequent this will occur, I can't say, of course. Possibly, or even
probably not frequent enough to worry about. But if you are worried about it, I suggest to start
with 100% and then monitor fragmentation level for the cl index to see if fragmentation increases
over time.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message news:76bc0008d16b1@.uwe...
> Just to be clear on what you are saying, as we are now getting to close to
> the final answer of my question regarding the FILLFACTOR on clustered indexes
> over an identity column. If I have a clustered index over an identity column,
> I can be confident in giving such an index a FILLFACTOR of 100, since we only
> perform INSERTS, and DELETEs are very rare? And the UPDATES, even though they
> might effect the non-clustered indexes, they will have no effect on the
> clustered index?
> Tibor Karaszi wrote:
>>As for UPDATE, you cannot change the identity column value with an UPDATE, so and update cannot
>>cause the row to "move" (for a cl ix over the identity column).
>>As for DELETE, well it will cause "holes". End result is that the pages aren't as full as they
>>could
>>be. In the end, you end up with more pages that you would needed. This is easy to see using DBCC
>>SHOWCONTIG/sys.dm_db:index_physical_stats. To "compact" the pages, you rebuild the clustered
>>index.
>>But there's no use to leave empty room on the pages since we already determined that you don't get
>>external fragmentation over such index.
>>Note that we have discussed an (clustered) index over an identity column. The table can have other
>>NC indexes, over other column combinations. And those B-trees will of course have different
>>fragmentation chacteristica.
>> Thanks Tibor.
>>[quoted text clipped - 20 lines]
>> Is there a formula that or method to determine the optimal FillFactor?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200708/1
>|||Are you meaning an UPDATE on the clustered index itself, such as an Identity
Insert that updates the identity column the clustered index is created off of,
or are you talking about an UPDATE on one of the non-clustered indexes?
Tibor Karaszi wrote:
>Very close. One situation that can occur is that an UPDATE result in the new row don't fit on the
>current page (say you change a column value from something small to something big). SQL Server would
>now need to split this page and link in a new page in the linked list. Then move 50% of the rows
>from the old page to the new page and the row now fit on either of these pages. The end result is
>... external fragmentation. How frequent this will occur, I can't say, of course. Possibly, or even
>probably not frequent enough to worry about. But if you are worried about it, I suggest to start
>with 100% and then monitor fragmentation level for the cl index to see if fragmentation increases
>over time.
>> Just to be clear on what you are saying, as we are now getting to close to
>> the final answer of my question regarding the FILLFACTOR on clustered indexes
>[quoted text clipped - 24 lines]
>> Is there a formula that or method to determine the optimal FillFactor?
--
Message posted via http://www.sqlmonster.com|||If you update any variable length column with a value larger than it was
originally you run the risk of a page split. Since the row will be larger
overall than it was before the update you may not have enough room on the
page if it was 100% (or close to it) full to begin with to hold the revised
row. So this does not have to be on a column with an index, just any
variable length column.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message
news:76cc88bc95e2b@.uwe...
> Are you meaning an UPDATE on the clustered index itself, such as an
> Identity
> Insert that updates the identity column the clustered index is created off
> of,
> or are you talking about an UPDATE on one of the non-clustered indexes?
> Tibor Karaszi wrote:
>>Very close. One situation that can occur is that an UPDATE result in the
>>new row don't fit on the
>>current page (say you change a column value from something small to
>>something big). SQL Server would
>>now need to split this page and link in a new page in the linked list.
>>Then move 50% of the rows
>>from the old page to the new page and the row now fit on either of these
>>pages. The end result is
>>... external fragmentation. How frequent this will occur, I can't say, of
>>course. Possibly, or even
>>probably not frequent enough to worry about. But if you are worried about
>>it, I suggest to start
>>with 100% and then monitor fragmentation level for the cl index to see if
>>fragmentation increases
>>over time.
>> Just to be clear on what you are saying, as we are now getting to close
>> to
>> the final answer of my question regarding the FILLFACTOR on clustered
>> indexes
>>[quoted text clipped - 24 lines]
>>>
>>> Is there a formula that or method to determine the optimal
>>> FillFactor?
> --
> Message posted via http://www.sqlmonster.com
>

FillFactor and Intermeditory Pages

hi all,
I am trying to understand more about fillfactor. After reading few articiles
on internet, I came to know that, the fillfactor is effective only on leaf
node/page. Does it mean that fillfactor will not have any effect on the
intermediatory pages.
thanks
pradeep_tp
Hi
You need to understand that lower value of FILL FACTOR leaves more empty
space on data page
Actually FILLFACTOR option means how full is your data page
In my opinion BOL has pretty good explanation about FILL FACTOR.
What is your concern?
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> hi all,
> I am trying to understand more about fillfactor. After reading few
> articiles
> on internet, I came to know that, the fillfactor is effective only on leaf
> node/page. Does it mean that fillfactor will not have any effect on the
> intermediatory pages.
> thanks
> pradeep_tp
|||Hi Uri,
My concern is knowledge. I want to fully undestand it fill factor. According
to what you say, fillfactor is effective only for data pages and not for
index pages. Am i correct. Also what is BOL?
pradeep
"Uri Dimant" wrote:

> Hi
> You need to understand that lower value of FILL FACTOR leaves more empty
> space on data page
> Actually FILLFACTOR option means how full is your data page
> In my opinion BOL has pretty good explanation about FILL FACTOR.
> What is your concern?
>
> "pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
> news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
>
>
|||Hi
The fill factor is implemented only when the index is created
BOL says
FILL Factor
An attribute of an index that defines the amount of free space on each page
of the index. FILLFACTOR accommodates future expansion of table data and
reduces the potential for page splits. FILLFACTOR is a value from 1 through
100 that specifies the percentage of the index page to be left empty.
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:745FF257-569B-4BCA-8BE1-A919129EA44D@.microsoft.com...[vbcol=seagreen]
> Hi Uri,
> My concern is knowledge. I want to fully undestand it fill factor.
> According
> to what you say, fillfactor is effective only for data pages and not for
> index pages. Am i correct. Also what is BOL?
> pradeep
> "Uri Dimant" wrote:
|||Yes, fillfactor applies only to leaf level. You do have the PAD_INDEX option which specifies that
the fillfactor value you specify also should be applied to the non-leaf level. But by default,
fillfactor is only applied at leaf level. In 2005, you can specify PAD_INDEX when you do index
rebuild, in earlier versions, you only had the PAD_INDEX option when you create the index (as far as
I remember).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> hi all,
> I am trying to understand more about fillfactor. After reading few articiles
> on internet, I came to know that, the fillfactor is effective only on leaf
> node/page. Does it mean that fillfactor will not have any effect on the
> intermediatory pages.
> thanks
> pradeep_tp
|||>Also what is BOL?
BOL is short for SQL Server Books Online, the documentation that comes with
the product.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:745FF257-569B-4BCA-8BE1-A919129EA44D@.microsoft.com...[vbcol=seagreen]
> Hi Uri,
> My concern is knowledge. I want to fully undestand it fill factor.
> According
> to what you say, fillfactor is effective only for data pages and not for
> index pages. Am i correct. Also what is BOL?
> pradeep
> "Uri Dimant" wrote:

FillFactor and Intermeditory Pages

hi all,
I am trying to understand more about fillfactor. After reading few articiles
on internet, I came to know that, the fillfactor is effective only on leaf
node/page. Does it mean that fillfactor will not have any effect on the
intermediatory pages.
thanks
pradeep_tpHi
You need to understand that lower value of FILL FACTOR leaves more empty
space on data page
Actually FILLFACTOR option means how full is your data page
In my opinion BOL has pretty good explanation about FILL FACTOR.
What is your concern?
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> hi all,
> I am trying to understand more about fillfactor. After reading few
> articiles
> on internet, I came to know that, the fillfactor is effective only on leaf
> node/page. Does it mean that fillfactor will not have any effect on the
> intermediatory pages.
> thanks
> pradeep_tp|||Hi Uri,
My concern is knowledge. I want to fully undestand it fill factor. According
to what you say, fillfactor is effective only for data pages and not for
index pages. Am i correct. Also what is BOL?
pradeep
"Uri Dimant" wrote:

> Hi
> You need to understand that lower value of FILL FACTOR leaves more empt
y
> space on data page
> Actually FILLFACTOR option means how full is your data page
> In my opinion BOL has pretty good explanation about FILL FACTOR.
> What is your concern?
>
> "pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
> news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
>
>|||Hi
The fill factor is implemented only when the index is created
BOL says
FILL Factor
An attribute of an index that defines the amount of free space on each page
of the index. FILLFACTOR accommodates future expansion of table data and
reduces the potential for page splits. FILLFACTOR is a value from 1 through
100 that specifies the percentage of the index page to be left empty.
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:745FF257-569B-4BCA-8BE1-A919129EA44D@.microsoft.com...[vbcol=seagreen]
> Hi Uri,
> My concern is knowledge. I want to fully undestand it fill factor.
> According
> to what you say, fillfactor is effective only for data pages and not for
> index pages. Am i correct. Also what is BOL?
> pradeep
> "Uri Dimant" wrote:
>|||Yes, fillfactor applies only to leaf level. You do have the PAD_INDEX option
which specifies that
the fillfactor value you specify also should be applied to the non-leaf leve
l. But by default,
fillfactor is only applied at leaf level. In 2005, you can specify PAD_INDEX
when you do index
rebuild, in earlier versions, you only had the PAD_INDEX option when you cre
ate the index (as far as
I remember).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> hi all,
> I am trying to understand more about fillfactor. After reading few articil
es
> on internet, I came to know that, the fillfactor is effective only on leaf
> node/page. Does it mean that fillfactor will not have any effect on the
> intermediatory pages.
> thanks
> pradeep_tp|||>Also what is BOL?
BOL is short for SQL Server Books Online, the documentation that comes with
the product.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:745FF257-569B-4BCA-8BE1-A919129EA44D@.microsoft.com...[vbcol=seagreen]
> Hi Uri,
> My concern is knowledge. I want to fully undestand it fill factor.
> According
> to what you say, fillfactor is effective only for data pages and not for
> index pages. Am i correct. Also what is BOL?
> pradeep
> "Uri Dimant" wrote:
>sql

FillFactor and Intermeditory Pages

hi all,
I am trying to understand more about fillfactor. After reading few articiles
on internet, I came to know that, the fillfactor is effective only on leaf
node/page. Does it mean that fillfactor will not have any effect on the
intermediatory pages.
thanks
pradeep_tpHi
You need to understand that lower value of FILL FACTOR leaves more empty
space on data page
Actually FILLFACTOR option means how full is your data page
In my opinion BOL has pretty good explanation about FILL FACTOR.
What is your concern?
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> hi all,
> I am trying to understand more about fillfactor. After reading few
> articiles
> on internet, I came to know that, the fillfactor is effective only on leaf
> node/page. Does it mean that fillfactor will not have any effect on the
> intermediatory pages.
> thanks
> pradeep_tp|||Hi Uri,
My concern is knowledge. I want to fully undestand it fill factor. According
to what you say, fillfactor is effective only for data pages and not for
index pages. Am i correct. Also what is BOL?
pradeep
"Uri Dimant" wrote:
> Hi
> You need to understand that lower value of FILL FACTOR leaves more empty
> space on data page
> Actually FILLFACTOR option means how full is your data page
> In my opinion BOL has pretty good explanation about FILL FACTOR.
> What is your concern?
>
> "pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
> news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> > hi all,
> >
> > I am trying to understand more about fillfactor. After reading few
> > articiles
> > on internet, I came to know that, the fillfactor is effective only on leaf
> > node/page. Does it mean that fillfactor will not have any effect on the
> > intermediatory pages.
> >
> > thanks
> > pradeep_tp
>
>|||Hi
The fill factor is implemented only when the index is created
BOL says
FILL Factor
An attribute of an index that defines the amount of free space on each page
of the index. FILLFACTOR accommodates future expansion of table data and
reduces the potential for page splits. FILLFACTOR is a value from 1 through
100 that specifies the percentage of the index page to be left empty.
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:745FF257-569B-4BCA-8BE1-A919129EA44D@.microsoft.com...
> Hi Uri,
> My concern is knowledge. I want to fully undestand it fill factor.
> According
> to what you say, fillfactor is effective only for data pages and not for
> index pages. Am i correct. Also what is BOL?
> pradeep
> "Uri Dimant" wrote:
>> Hi
>> You need to understand that lower value of FILL FACTOR leaves more
>> empty
>> space on data page
>> Actually FILLFACTOR option means how full is your data page
>> In my opinion BOL has pretty good explanation about FILL FACTOR.
>> What is your concern?
>>
>> "pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
>> news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
>> > hi all,
>> >
>> > I am trying to understand more about fillfactor. After reading few
>> > articiles
>> > on internet, I came to know that, the fillfactor is effective only on
>> > leaf
>> > node/page. Does it mean that fillfactor will not have any effect on the
>> > intermediatory pages.
>> >
>> > thanks
>> > pradeep_tp
>>|||Yes, fillfactor applies only to leaf level. You do have the PAD_INDEX option which specifies that
the fillfactor value you specify also should be applied to the non-leaf level. But by default,
fillfactor is only applied at leaf level. In 2005, you can specify PAD_INDEX when you do index
rebuild, in earlier versions, you only had the PAD_INDEX option when you create the index (as far as
I remember).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
> hi all,
> I am trying to understand more about fillfactor. After reading few articiles
> on internet, I came to know that, the fillfactor is effective only on leaf
> node/page. Does it mean that fillfactor will not have any effect on the
> intermediatory pages.
> thanks
> pradeep_tp|||>Also what is BOL?
BOL is short for SQL Server Books Online, the documentation that comes with
the product.
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
news:745FF257-569B-4BCA-8BE1-A919129EA44D@.microsoft.com...
> Hi Uri,
> My concern is knowledge. I want to fully undestand it fill factor.
> According
> to what you say, fillfactor is effective only for data pages and not for
> index pages. Am i correct. Also what is BOL?
> pradeep
> "Uri Dimant" wrote:
>> Hi
>> You need to understand that lower value of FILL FACTOR leaves more
>> empty
>> space on data page
>> Actually FILLFACTOR option means how full is your data page
>> In my opinion BOL has pretty good explanation about FILL FACTOR.
>> What is your concern?
>>
>> "pradeep_TP" <pradeepTP@.discussions.microsoft.com> wrote in message
>> news:DF4F5805-5BFD-4E46-A26C-EA3758FB2FA7@.microsoft.com...
>> > hi all,
>> >
>> > I am trying to understand more about fillfactor. After reading few
>> > articiles
>> > on internet, I came to know that, the fillfactor is effective only on
>> > leaf
>> > node/page. Does it mean that fillfactor will not have any effect on the
>> > intermediatory pages.
>> >
>> > thanks
>> > pradeep_tp
>>

Fill footer dynamically by group

Hello,
I would like to modify dynamically my footer.
I have a list displayed on several pages and grouping my data on IDCategory. I would like to put on the footer the name of the category on each page of the list.
When I use a textbox (with the name of category) on the body, with a link ReportItems!textbox1.Value on the footer, the value is only displayed on the first page of my report.
Could you tell me how to display it on each page ?
The second footer problem is that I want to hide this footer on the first page of my list. In reporting services, you can hide the footer on the first page, but can you hide the footer of each first page of a list ?
Thanks for all.Report item references from the page header/footer return Nothing if that
report item doesn't appear on the page.
Instead of putting a single textbox in the body (which would only appear on
the first page of the report), put the textbox in your innermost list. That
way it will be certain to appear on every page (mark it as Hidden so that it
is on the page but not visisble to the user).
For the second problem, you need some way of detecting the start of your
inner list. For this, you could add a second (hidden) textbox inside the
outer list. Then the expression in your footer could be something like
this:
=iif(ReportItems!textbox2.Value is Nothing, ReportItems!textbox1.Value,
Nothing)
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"Drix" <Drix@.discussions.microsoft.com> wrote in message
news:65779D3C-E124-45D7-AD0A-4D20627F3664@.microsoft.com...
> Hello,
> I would like to modify dynamically my footer.
> I have a list displayed on several pages and grouping my data on
IDCategory. I would like to put on the footer the name of the category on
each page of the list.
> When I use a textbox (with the name of category) on the body, with a link
ReportItems!textbox1.Value on the footer, the value is only displayed on the
first page of my report.
> Could you tell me how to display it on each page ?
> The second footer problem is that I want to hide this footer on the first
page of my list. In reporting services, you can hide the footer on the first
page, but can you hide the footer of each first page of a list ?
> Thanks for all.|||Thanks for your help.
For your first answer, what do you mean with "innermost" ? I've tried to put the textbox at the bottom of the list, but the problem persists : the footer only appears on the last page.
For your second answer, it's not possible to put on the footer more than one reference to the body and I couldn't test other solutions if the first problem isn't resolved !
Thanks for your help for "innermost"...
"Chris Hays [MSFT]" wrote:
> Report item references from the page header/footer return Nothing if that
> report item doesn't appear on the page.
> Instead of putting a single textbox in the body (which would only appear on
> the first page of the report), put the textbox in your innermost list. That
> way it will be certain to appear on every page (mark it as Hidden so that it
> is on the page but not visisble to the user).
> For the second problem, you need some way of detecting the start of your
> inner list. For this, you could add a second (hidden) textbox inside the
> outer list. Then the expression in your footer could be something like
> this:
> =iif(ReportItems!textbox2.Value is Nothing, ReportItems!textbox1.Value,
> Nothing)
> --
> My employer's lawyers require me to say:
> "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> "Drix" <Drix@.discussions.microsoft.com> wrote in message
> news:65779D3C-E124-45D7-AD0A-4D20627F3664@.microsoft.com...
> > Hello,
> >
> > I would like to modify dynamically my footer.
> > I have a list displayed on several pages and grouping my data on
> IDCategory. I would like to put on the footer the name of the category on
> each page of the list.
> >
> > When I use a textbox (with the name of category) on the body, with a link
> ReportItems!textbox1.Value on the footer, the value is only displayed on the
> first page of my report.
> > Could you tell me how to display it on each page ?
> >
> > The second footer problem is that I want to hide this footer on the first
> page of my list. In reporting services, you can hide the footer on the first
> page, but can you hide the footer of each first page of a list ?
> >
> > Thanks for all.
>
>|||Based on your description, you have two lists (the outer one containing the
inner one).
The outer list groups on IDCategory. The second textbox should be inside
this list.
The inner list doesn't group (it shows detail data). The first textbox
should be inside this list.
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"Drix" <Drix@.discussions.microsoft.com> wrote in message
news:E931E967-9FC5-4EA9-9D2A-26554B26AEC4@.microsoft.com...
> Thanks for your help.
> For your first answer, what do you mean with "innermost" ? I've tried to
put the textbox at the bottom of the list, but the problem persists : the
footer only appears on the last page.
> For your second answer, it's not possible to put on the footer more than
one reference to the body and I couldn't test other solutions if the first
problem isn't resolved !
> Thanks for your help for "innermost"...
>
> "Chris Hays [MSFT]" wrote:
> > Report item references from the page header/footer return Nothing if
that
> > report item doesn't appear on the page.
> >
> > Instead of putting a single textbox in the body (which would only appear
on
> > the first page of the report), put the textbox in your innermost list.
That
> > way it will be certain to appear on every page (mark it as Hidden so
that it
> > is on the page but not visisble to the user).
> >
> > For the second problem, you need some way of detecting the start of your
> > inner list. For this, you could add a second (hidden) textbox inside
the
> > outer list. Then the expression in your footer could be something like
> > this:
> >
> > =iif(ReportItems!textbox2.Value is Nothing, ReportItems!textbox1.Value,
> > Nothing)
> >
> > --
> > My employer's lawyers require me to say:
> > "This posting is provided 'AS IS' with no warranties, and confers no
> > rights."
> >
> > "Drix" <Drix@.discussions.microsoft.com> wrote in message
> > news:65779D3C-E124-45D7-AD0A-4D20627F3664@.microsoft.com...
> > > Hello,
> > >
> > > I would like to modify dynamically my footer.
> > > I have a list displayed on several pages and grouping my data on
> > IDCategory. I would like to put on the footer the name of the category
on
> > each page of the list.
> > >
> > > When I use a textbox (with the name of category) on the body, with a
link
> > ReportItems!textbox1.Value on the footer, the value is only displayed on
the
> > first page of my report.
> > > Could you tell me how to display it on each page ?
> > >
> > > The second footer problem is that I want to hide this footer on the
first
> > page of my list. In reporting services, you can hide the footer on the
first
> > page, but can you hide the footer of each first page of a list ?
> > >
> > > Thanks for all.
> >
> >
> >sql