Greetings,
I'm trying to minimize my 40gb .ldf transaction log. First, I tried shrinking just the transaction log by using both the Shrink Database > Files method and by scripting (DBCC SHRINKFILE) and while the transaction log seemed to go down quite a bit according to the Enterprise Manager statistics, the LDF sitting in our Program Files folder remains at about 37gb.
I then read somewhere that backing up the transaction log can also aid in minimizing its size but this has yet to make any kind of a difference. In addition, I'm also seeing here on the newsgroup that converting the database to simple recovery mode can help keep the LDF to a good size but, according to MS documentation, "there are limitations placed on the recoverability of a database if this recovery model is used." That sounds a little too eerie to me as this particular DB is quite crucial to our operation. Does anyone have any tricks to get a nearly 40gb LDF down to a decent size?
Thanks in advance for any and al information!
- J
The first and most important thing is that you understand what the
transaction log is for and how to use it for backup and recovery purposes.
It seems obvious from several things you have said that you need to do some
reading. Please study the backup and recovery topics in Books Online and
review your backup and recovery strategy before deciding how to proceed.
If you are running under full recovery then you need to make sure your
transaction log is large enough to accommodate all transactions between each
log backup. The correct size for the transaction log will therefore be
determined by how many updates your database has and how often you do
backups. Note that backing up the log will not reduce its size but it will
allow SQL Server to re-use that space. On the information given therefore
there is no reason to believe you need do anything immediately. What makes
you want to reduce the size of the log?
David Portas
|||Dear Jason,
Thank you for posting here.
Before running the DBCC SHRINKFILE to shrink the Transaction Log, we must
first run a BACKUP LOG statement to backup the current Transaction Log. As
mentioned by David, although backing up the log will not directly reduce
its size, it removes the inactive portion of the log and then "DBCC
SHRINKFILE" command will be able to free these spaces. For your reference,
the following actions are required to complete the shrinking of the
transaction log:
1. You must run a BACKUP LOG statement to free up space by removing the
inactive portion of the log.
2. You must run DBCC SHRINKFILE again with the desired target size until
the log file shrinks to the target size.
Below is the related KB article:
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/kb/272318
Additionally, although Simple Recovery mode can keep the LDF file to a
smaller size, there are some limitation s exist. For example, we are unable
to recover to a specific point in time and can only recover to the end of a
backup. This recovery mode is NOT recommended for the database in the
production environment. You can refer to the SQL Server Book Online about
this topic (http://msdn2.microsoft.com/en-us/library/ms189275.aspx)
Hope it helps.
Have a nice day!
Best regards,
Adams Qu, MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
================================================== ===
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "Jason H." <cupahr@.community.nospam>
| Subject: Issues Minimizing Size of LDF Transaction Log on SQL Server 2000
| Date: Thu, 13 Mar 2008 15:10:51 -0400
| Lines: 69
| Organization: CUPA-HR
| Message-ID: <CB7EEA2C-2E49-43E1-9491-E4082D529223@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
| boundary="--=_NextPart_000_0028_01C8851C.6D2EC7E0"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
| X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
| X-MS-CommunityGroup-PostID: {CB7EEA2C-2E49-43E1-9491-E4082D529223}
| X-MS-CommunityGroup-MessageCategory:
{E4FCE0A9-75B4-4168-BFF9-16C22D8747EC}
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: mail.cupahr.org 65.23.122.33
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:38532
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Greetings,
| I'm trying to minimize my 40gb .ldf transaction log. First, I tried
shrinking just the transaction log by using both the Shrink Database >
Files method and by scripting (DBCC SHRINKFILE) and while the transaction
log seemed to go down quite a bit according to the Enterprise Manager
statistics, the LDF sitting in our Program Files folder remains at about
37gb.
| I then read somewhere that backing up the transaction log can also aid in
minimizing its size but this has yet to make any kind of a difference. In
addition, I'm also seeing here on the newsgroup that converting the
database to simple recovery mode can help keep the LDF to a good size but,
according to MS documentation, "there are limitations placed on the
recoverability of a database if this recovery model is used." That sounds
a little too eerie to me as this particular DB is quite crucial to our
operation. Does anyone have any tricks to get a nearly 40gb LDF down to a
decent size?
| Thanks in advance for any and al information!
| - J
|
|||Dear Jason,
We wanted to see if the information provided was helpful. Please keep us
posted on your progress and let us know if you have any additional
questions or concerns.
We are looking forward to your response.
Have a nice day!
Best regards,
Adams Qu, MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
================================================== ===
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
| X-Tomcat-ID: 89922039
| References: <CB7EEA2C-2E49-43E1-9491-E4082D529223@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-adamqu@.online.microsoft.com (Adams Qu [MSFT])
| Organization: Microsoft
| Date: Fri, 14 Mar 2008 09:46:48 GMT
| Subject: RE: Issues Minimizing Size of LDF Transaction Log on SQL Server
2000
| X-Tomcat-NG: microsoft.public.sqlserver.server
| Message-ID: <LixsThbhIHA.360@.TK2MSFTNGHUB02.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| Lines: 99
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:38573
| NNTP-Posting-Host: tk5tomimport2.phx.gbl 10.201.218.20
|
| Dear Jason,
|
| Thank you for posting here.
|
| Before running the DBCC SHRINKFILE to shrink the Transaction Log, we must
| first run a BACKUP LOG statement to backup the current Transaction Log.
As
| mentioned by David, although backing up the log will not directly reduce
| its size, it removes the inactive portion of the log and then "DBCC
| SHRINKFILE" command will be able to free these spaces. For your
reference,
| the following actions are required to complete the shrinking of the
| transaction log:
|
| 1. You must run a BACKUP LOG statement to free up space by removing the
| inactive portion of the log.
| 2. You must run DBCC SHRINKFILE again with the desired target size until
| the log file shrinks to the target size.
|
| Below is the related KB article:
|
| INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
| http://support.microsoft.com/kb/272318
|
| Additionally, although Simple Recovery mode can keep the LDF file to a
| smaller size, there are some limitation s exist. For example, we are
unable
| to recover to a specific point in time and can only recover to the end of
a
| backup. This recovery mode is NOT recommended for the database in the
| production environment. You can refer to the SQL Server Book Online about
| this topic (http://msdn2.microsoft.com/en-us/library/ms189275.aspx)
|
| Hope it helps.
|
| Have a nice day!
|
| Best regards,
|
| Adams Qu, MCSE, MCDBA, MCTS
| Microsoft Online Support
|
| Microsoft Global Technical Support Center
|
| Get Secure! - www.microsoft.com/security
| ================================================== ===
| When responding to posts, please "Reply to Group" via your newsreader so
| that others may learn and benefit from your issue.
| ================================================== ===
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| --
| | From: "Jason H." <cupahr@.community.nospam>
| | Subject: Issues Minimizing Size of LDF Transaction Log on SQL Server
2000
| | Date: Thu, 13 Mar 2008 15:10:51 -0400
| | Lines: 69
| | Organization: CUPA-HR
| | Message-ID: <CB7EEA2C-2E49-43E1-9491-E4082D529223@.microsoft.com>
| | MIME-Version: 1.0
| | Content-Type: multipart/alternative;
| | boundary="--=_NextPart_000_0028_01C8851C.6D2EC7E0"
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
| | X-MS-CommunityGroup-PostID: {CB7EEA2C-2E49-43E1-9491-E4082D529223}
| | X-MS-CommunityGroup-MessageCategory:
| {E4FCE0A9-75B4-4168-BFF9-16C22D8747EC}
| | Newsgroups: microsoft.public.sqlserver.server
| | NNTP-Posting-Host: mail.cupahr.org 65.23.122.33
| | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:38532
| | X-Tomcat-NG: microsoft.public.sqlserver.server
| |
| | Greetings,
| | I'm trying to minimize my 40gb .ldf transaction log. First, I tried
| shrinking just the transaction log by using both the Shrink Database >
| Files method and by scripting (DBCC SHRINKFILE) and while the transaction
| log seemed to go down quite a bit according to the Enterprise Manager
| statistics, the LDF sitting in our Program Files folder remains at about
| 37gb.
| | I then read somewhere that backing up the transaction log can also aid
in
| minimizing its size but this has yet to make any kind of a difference.
In
| addition, I'm also seeing here on the newsgroup that converting the
| database to simple recovery mode can help keep the LDF to a good size
but,
| according to MS documentation, "there are limitations placed on the
| recoverability of a database if this recovery model is used." That
sounds
| a little too eerie to me as this particular DB is quite crucial to our
| operation. Does anyone have any tricks to get a nearly 40gb LDF down to
a
| decent size?
| | Thanks in advance for any and al information!
| | - J
| |
|
|
Showing posts with label size. Show all posts
Showing posts with label size. Show all posts
Monday, March 19, 2012
Monday, March 12, 2012
Issue with size
Dear gurus,
How could I figure out the size of one database in 2004?
Linking 2004 information(mdf) with the current one I will obtain how many
points in % has grow up that database, but how' Is that information lost?
I unfortunately think so.
Thanks in advance and regards,
Enricexamnotes (Enric@.discussions.microsoft.com) writes:
> How could I figure out the size of one database in 2004?
> Linking 2004 information(mdf) with the current one I will obtain how many
> points in % has grow up that database, but how' Is that information lost?
> I unfortunately think so.
I'm not sure I understand the question, but if the question is "how can I
find out how which size the database had as some point in year 2004?", then
I'm afraid that the only way to find out is to dig up a backup from
that time and restore it.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Exactly, you perfectly understood it. I am afraid that such solution would
jeopardise the system. If I have to restore each database (to tell the truth
are more than 40 databases) and then compare these data with the current one
.
The next one I'll try be more explicit. English is not my mother tongue.
Thanks in advance,
"Erland Sommarskog" wrote:
> examnotes (Enric@.discussions.microsoft.com) writes:
> I'm not sure I understand the question, but if the question is "how can I
> find out how which size the database had as some point in year 2004?", the
n
> I'm afraid that the only way to find out is to dig up a backup from
> that time and restore it.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>|||> jeopardise the system. If I have to restore each database (to tell the
> truth
> are more than 40 databases) and then compare these data with the current
> one.
Then one thing you could do is log to an external system the results of,
say, sp_spaceused for each database, and do so periodically (e.g. daily,
w
ly, monthly). Then you will have a running history going forward at
least (given that it won't help you for historic data).|||Thanks Aaron,
"Aaron Bertrand [SQL Server MVP]" wrote:
> Then one thing you could do is log to an external system the results of,
> say, sp_spaceused for each database, and do so periodically (e.g. daily,
> w
ly, monthly). Then you will have a running history going forward at
> least (given that it won't help you for historic data).
>
>
How could I figure out the size of one database in 2004?
Linking 2004 information(mdf) with the current one I will obtain how many
points in % has grow up that database, but how' Is that information lost?
I unfortunately think so.
Thanks in advance and regards,
Enricexamnotes (Enric@.discussions.microsoft.com) writes:
> How could I figure out the size of one database in 2004?
> Linking 2004 information(mdf) with the current one I will obtain how many
> points in % has grow up that database, but how' Is that information lost?
> I unfortunately think so.
I'm not sure I understand the question, but if the question is "how can I
find out how which size the database had as some point in year 2004?", then
I'm afraid that the only way to find out is to dig up a backup from
that time and restore it.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Exactly, you perfectly understood it. I am afraid that such solution would
jeopardise the system. If I have to restore each database (to tell the truth
are more than 40 databases) and then compare these data with the current one
.
The next one I'll try be more explicit. English is not my mother tongue.
Thanks in advance,
"Erland Sommarskog" wrote:
> examnotes (Enric@.discussions.microsoft.com) writes:
> I'm not sure I understand the question, but if the question is "how can I
> find out how which size the database had as some point in year 2004?", the
n
> I'm afraid that the only way to find out is to dig up a backup from
> that time and restore it.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>|||> jeopardise the system. If I have to restore each database (to tell the
> truth
> are more than 40 databases) and then compare these data with the current
> one.
Then one thing you could do is log to an external system the results of,
say, sp_spaceused for each database, and do so periodically (e.g. daily,
w
least (given that it won't help you for historic data).|||Thanks Aaron,
"Aaron Bertrand [SQL Server MVP]" wrote:
> Then one thing you could do is log to an external system the results of,
> say, sp_spaceused for each database, and do so periodically (e.g. daily,
> w
> least (given that it won't help you for historic data).
>
>
Wednesday, March 7, 2012
Issue with a table that is 75%-80% of the database size
Hello All,
I need help to figure out what I could do about a big
issue that we have with our database size.
Our database easily grows to a size over 250 GB and up.
And the majority of the data (about 75%) is stored in
this one table (tb_content)with several columns in which
we are storing text in its text data type column.
The database is used for online transaction processing
application.
Users connect to the database through a Query application
to query for a particular row of this big table
(tb_content). Of course the query inlcudes joining few
other tables in the database as well. After the result is
returned to the users, users would update the data in
serveral tables using the application.
The concerns are to improve the response time for each
query and reduce the time that it takes to backup the
database.
We were able to improve the query response time by
implementing Full-text indexing.
Any suggestions or recommendations that would help to
reduce the size of a table that holds 75%-80% of the data
content of a database to help to improve the query
response time and the time that it takes to backup the
database. Is there a such thing as to create a
particulare table of a database on a different filegroup?
How about partitioning a particulare table?
I appreciate your help!
Thank you,
-Mitra"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
Have you considered normalizing your data instead of storing it as a big
blob of text? This would almost certainly result in a lot of the
performance increase and size decrease you're looking for.|||Hello Adam,
You mentioned:
>Have you considered normalizing your data instead of
storing it as a big
>blob of text?
our table, tb_content, only have three columns:
Create Table tb_content
(
id int, --PK
size int, -- size of the content
content text -- the text of the messages
)
This table is normalized.
Thanks,
-Mitra
>--Original Message--
>"Mitra Fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
data[vbcol=seagreen]
> Have you considered normalizing your data instead of
storing it as a big
>blob of text? This would almost certainly result in a
lot of the
>performance increase and size decrease you're looking
for.
>
>.
>|||"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> This table is normalized.
What are you storing in the contents column? Please post a few rows of
sample data.|||Here is a sample data:
id_col size_col content_col
1 24 Please review the notes.
2 46 Please email or call me when you
hear from Bob.
3 59 Did you hear the new news
about John moving to a new place.
We are storing the message body of emails in text in the
content column.
Please note the issue with this table seems to be that we
have too many rows (millions or billions)that leads to
75%-80% of the size of the database.
Thank you,
-Mitra
>--Original Message--
>
>"mitra fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> What are you storing in the contents column? Please
post a few rows of
>sample data.
>
>.
>|||mitra fatolahi wrote:[vbcol=seagreen]
> Hello Adam,
> You mentioned:
>
> our table, tb_content, only have three columns:
> Create Table tb_content
> (
> id int, --PK
> size int, -- size of the content
> content text -- the text of the messages
> )
> This table is normalized.
> Thanks,
> -Mitra
Despite the fact that the table consumes 75% of the overall database
size, what issue or issues are you having with it? You can move the Text
column to another filegroup if you want with the TEXTIMAGE_ON {
filegroup | DEFAULT } option in Create Table. Or you can move the whole
table.
You can also save some the smaller text data in the row itself and the
larger text data using a pointer to the data using the the
sp_tableoption text in row function if performance is a concern.
If the table is highly-transactional, then consider moving it to a
mirrored drive array instead of a RAID 5 array.
You could partition the table into multiple tables using a partitioned
view (see BOL)
Other ways to reduce size may be to use a clustered PK in the ID column
instead of a non-clustered index or compress the text data and store as
binary.
David G.|||Okay, your table certainly is normalized. I misunderstood what kind of data
you were storing.
Unless you can delete/archive some of the older data in the table, there's
really not a lot you can do to improve this situation. You could
potentially speed up queries by adding a SMALLDATETIME column and allowing
(or forcing) users to query based on date as well as text. You could also
potentially speed things up a bit using the "text in row" option (look up in
BOL for more information).
As for speed of backup, that's fully dependant upon data size. However, you
could consider using a third-party backup tool with built-in compression,
which would probably help quite a bit. Have you tried SQL Lite Speed (
http://www.imceda.com/LiteSpeed_Description.htm )? It's an excellent
product and really speeds up backups.
"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ead01c48ec1$b7d33100$a601280a@.phx.gbl...
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
>|||mitra fatolahi wrote:
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
In addition to my other comments (in my other post), have you considered
storing the text as IDs into a table of valid comments. If you can at
least fit some of the common comments into a consolidated list, you can
just add a FK to the comments table. You could then use a text column
for any comments that do not fit into the standard.
Or you could use something like prinf() function provides, where there
are placeholders for specific data in the string, but the long text
itself is standardized.
For example, "Please email or call when you hear from %s" as a FK and
then just store the %s value in the table.
I guess there are many ways you could go here.
David G.|||SQL Server 2000 does not support table partitioning. However, if you OLTP
query is simple enough, you might be able to use partitioned view to achieve
a similar result: create serveral tables with the same schema, then create a
view to union them together. If this is possible, then you can use put each
table in its own filegroup and use a filegroup based backup stragtegy.
Regarding reducing backup time, is your database recovery model simple or
full? Have you tried database differential backup?
SQL Server 2005 beta 2 has a table partitioning feature that might help both
your query response time and backup time. Please see this article for some
overview of SQL Server 2005 for DBA:
http://www.microsoft.com/technet/pr...in/sqlydba.mspx
Wei Xiao
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Hello All,
> I need help to figure out what I could do about a big
> issue that we have with our database size.
> Our database easily grows to a size over 250 GB and up.
> And the majority of the data (about 75%) is stored in
> this one table (tb_content)with several columns in which
> we are storing text in its text data type column.
> The database is used for online transaction processing
> application.
> Users connect to the database through a Query application
> to query for a particular row of this big table
> (tb_content). Of course the query inlcudes joining few
> other tables in the database as well. After the result is
> returned to the users, users would update the data in
> serveral tables using the application.
> The concerns are to improve the response time for each
> query and reduce the time that it takes to backup the
> database.
> We were able to improve the query response time by
> implementing Full-text indexing.
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
> content of a database to help to improve the query
> response time and the time that it takes to backup the
> database. Is there a such thing as to create a
> particulare table of a database on a different filegroup?
> How about partitioning a particulare table?
> I appreciate your help!
> Thank you,
> -Mitra
>
>
I need help to figure out what I could do about a big
issue that we have with our database size.
Our database easily grows to a size over 250 GB and up.
And the majority of the data (about 75%) is stored in
this one table (tb_content)with several columns in which
we are storing text in its text data type column.
The database is used for online transaction processing
application.
Users connect to the database through a Query application
to query for a particular row of this big table
(tb_content). Of course the query inlcudes joining few
other tables in the database as well. After the result is
returned to the users, users would update the data in
serveral tables using the application.
The concerns are to improve the response time for each
query and reduce the time that it takes to backup the
database.
We were able to improve the query response time by
implementing Full-text indexing.
Any suggestions or recommendations that would help to
reduce the size of a table that holds 75%-80% of the data
content of a database to help to improve the query
response time and the time that it takes to backup the
database. Is there a such thing as to create a
particulare table of a database on a different filegroup?
How about partitioning a particulare table?
I appreciate your help!
Thank you,
-Mitra"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
Have you considered normalizing your data instead of storing it as a big
blob of text? This would almost certainly result in a lot of the
performance increase and size decrease you're looking for.|||Hello Adam,
You mentioned:
>Have you considered normalizing your data instead of
storing it as a big
>blob of text?
our table, tb_content, only have three columns:
Create Table tb_content
(
id int, --PK
size int, -- size of the content
content text -- the text of the messages
)
This table is normalized.
Thanks,
-Mitra
>--Original Message--
>"Mitra Fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
data[vbcol=seagreen]
> Have you considered normalizing your data instead of
storing it as a big
>blob of text? This would almost certainly result in a
lot of the
>performance increase and size decrease you're looking
for.
>
>.
>|||"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> This table is normalized.
What are you storing in the contents column? Please post a few rows of
sample data.|||Here is a sample data:
id_col size_col content_col
1 24 Please review the notes.
2 46 Please email or call me when you
hear from Bob.
3 59 Did you hear the new news
about John moving to a new place.
We are storing the message body of emails in text in the
content column.
Please note the issue with this table seems to be that we
have too many rows (millions or billions)that leads to
75%-80% of the size of the database.
Thank you,
-Mitra
>--Original Message--
>
>"mitra fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> What are you storing in the contents column? Please
post a few rows of
>sample data.
>
>.
>|||mitra fatolahi wrote:[vbcol=seagreen]
> Hello Adam,
> You mentioned:
>
> our table, tb_content, only have three columns:
> Create Table tb_content
> (
> id int, --PK
> size int, -- size of the content
> content text -- the text of the messages
> )
> This table is normalized.
> Thanks,
> -Mitra
Despite the fact that the table consumes 75% of the overall database
size, what issue or issues are you having with it? You can move the Text
column to another filegroup if you want with the TEXTIMAGE_ON {
filegroup | DEFAULT } option in Create Table. Or you can move the whole
table.
You can also save some the smaller text data in the row itself and the
larger text data using a pointer to the data using the the
sp_tableoption text in row function if performance is a concern.
If the table is highly-transactional, then consider moving it to a
mirrored drive array instead of a RAID 5 array.
You could partition the table into multiple tables using a partitioned
view (see BOL)
Other ways to reduce size may be to use a clustered PK in the ID column
instead of a non-clustered index or compress the text data and store as
binary.
David G.|||Okay, your table certainly is normalized. I misunderstood what kind of data
you were storing.
Unless you can delete/archive some of the older data in the table, there's
really not a lot you can do to improve this situation. You could
potentially speed up queries by adding a SMALLDATETIME column and allowing
(or forcing) users to query based on date as well as text. You could also
potentially speed things up a bit using the "text in row" option (look up in
BOL for more information).
As for speed of backup, that's fully dependant upon data size. However, you
could consider using a third-party backup tool with built-in compression,
which would probably help quite a bit. Have you tried SQL Lite Speed (
http://www.imceda.com/LiteSpeed_Description.htm )? It's an excellent
product and really speeds up backups.
"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ead01c48ec1$b7d33100$a601280a@.phx.gbl...
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
>|||mitra fatolahi wrote:
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
In addition to my other comments (in my other post), have you considered
storing the text as IDs into a table of valid comments. If you can at
least fit some of the common comments into a consolidated list, you can
just add a FK to the comments table. You could then use a text column
for any comments that do not fit into the standard.
Or you could use something like prinf() function provides, where there
are placeholders for specific data in the string, but the long text
itself is standardized.
For example, "Please email or call when you hear from %s" as a FK and
then just store the %s value in the table.
I guess there are many ways you could go here.
David G.|||SQL Server 2000 does not support table partitioning. However, if you OLTP
query is simple enough, you might be able to use partitioned view to achieve
a similar result: create serveral tables with the same schema, then create a
view to union them together. If this is possible, then you can use put each
table in its own filegroup and use a filegroup based backup stragtegy.
Regarding reducing backup time, is your database recovery model simple or
full? Have you tried database differential backup?
SQL Server 2005 beta 2 has a table partitioning feature that might help both
your query response time and backup time. Please see this article for some
overview of SQL Server 2005 for DBA:
http://www.microsoft.com/technet/pr...in/sqlydba.mspx
Wei Xiao
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Hello All,
> I need help to figure out what I could do about a big
> issue that we have with our database size.
> Our database easily grows to a size over 250 GB and up.
> And the majority of the data (about 75%) is stored in
> this one table (tb_content)with several columns in which
> we are storing text in its text data type column.
> The database is used for online transaction processing
> application.
> Users connect to the database through a Query application
> to query for a particular row of this big table
> (tb_content). Of course the query inlcudes joining few
> other tables in the database as well. After the result is
> returned to the users, users would update the data in
> serveral tables using the application.
> The concerns are to improve the response time for each
> query and reduce the time that it takes to backup the
> database.
> We were able to improve the query response time by
> implementing Full-text indexing.
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
> content of a database to help to improve the query
> response time and the time that it takes to backup the
> database. Is there a such thing as to create a
> particulare table of a database on a different filegroup?
> How about partitioning a particulare table?
> I appreciate your help!
> Thank you,
> -Mitra
>
>
Issue with a table that is 75%-80% of the database size
Hello All,
I need help to figure out what I could do about a big
issue that we have with our database size.
Our database easily grows to a size over 250 GB and up.
And the majority of the data (about 75%) is stored in
this one table (tb_content)with several columns in which
we are storing text in its text data type column.
The database is used for online transaction processing
application.
Users connect to the database through a Query application
to query for a particular row of this big table
(tb_content). Of course the query inlcudes joining few
other tables in the database as well. After the result is
returned to the users, users would update the data in
serveral tables using the application.
The concerns are to improve the response time for each
query and reduce the time that it takes to backup the
database.
We were able to improve the query response time by
implementing Full-text indexing.
Any suggestions or recommendations that would help to
reduce the size of a table that holds 75%-80% of the data
content of a database to help to improve the query
response time and the time that it takes to backup the
database. Is there a such thing as to create a
particulare table of a database on a different filegroup?
How about partitioning a particulare table?
I appreciate your help!
Thank you,
-Mitra
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
Have you considered normalizing your data instead of storing it as a big
blob of text? This would almost certainly result in a lot of the
performance increase and size decrease you're looking for.
|||Hello Adam,
You mentioned:
>Have you considered normalizing your data instead of
storing it as a big
>blob of text?
our table, tb_content, only have three columns:
Create Table tb_content
(
id int, --PK
size int, -- size of the content
content text -- the text of the messages
)
This table is normalized.
Thanks,
-Mitra
>--Original Message--
>"Mitra Fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message[vbcol=seagreen]
>news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
data
> Have you considered normalizing your data instead of
storing it as a big
>blob of text? This would almost certainly result in a
lot of the
>performance increase and size decrease you're looking
for.
>
>.
>
|||"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> This table is normalized.
What are you storing in the contents column? Please post a few rows of
sample data.
|||Here is a sample data:
id_col size_col content_col
1 24 Please review the notes.
2 46 Please email or call me when you
hear from Bob.
3 59 Did you hear the new news
about John moving to a new place.
We are storing the message body of emails in text in the
content column.
Please note the issue with this table seems to be that we
have too many rows (millions or billions)that leads to
75%-80% of the size of the database.
Thank you,
-Mitra
>--Original Message--
>
>"mitra fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> What are you storing in the contents column? Please
post a few rows of
>sample data.
>
>.
>
|||mitra fatolahi wrote:[vbcol=seagreen]
> Hello Adam,
> You mentioned:
>
> our table, tb_content, only have three columns:
> Create Table tb_content
> (
> id int, --PK
> size int, -- size of the content
> content text -- the text of the messages
> )
> This table is normalized.
> Thanks,
> -Mitra
Despite the fact that the table consumes 75% of the overall database
size, what issue or issues are you having with it? You can move the Text
column to another filegroup if you want with the TEXTIMAGE_ON {
filegroup | DEFAULT } option in Create Table. Or you can move the whole
table.
You can also save some the smaller text data in the row itself and the
larger text data using a pointer to the data using the the
sp_tableoption text in row function if performance is a concern.
If the table is highly-transactional, then consider moving it to a
mirrored drive array instead of a RAID 5 array.
You could partition the table into multiple tables using a partitioned
view (see BOL)
Other ways to reduce size may be to use a clustered PK in the ID column
instead of a non-clustered index or compress the text data and store as
binary.
David G.
|||Okay, your table certainly is normalized. I misunderstood what kind of data
you were storing.
Unless you can delete/archive some of the older data in the table, there's
really not a lot you can do to improve this situation. You could
potentially speed up queries by adding a SMALLDATETIME column and allowing
(or forcing) users to query based on date as well as text. You could also
potentially speed things up a bit using the "text in row" option (look up in
BOL for more information).
As for speed of backup, that's fully dependant upon data size. However, you
could consider using a third-party backup tool with built-in compression,
which would probably help quite a bit. Have you tried SQL Lite Speed (
http://www.imceda.com/LiteSpeed_Description.htm )? It's an excellent
product and really speeds up backups.
"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ead01c48ec1$b7d33100$a601280a@.phx.gbl...
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
>
|||mitra fatolahi wrote:
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
In addition to my other comments (in my other post), have you considered
storing the text as IDs into a table of valid comments. If you can at
least fit some of the common comments into a consolidated list, you can
just add a FK to the comments table. You could then use a text column
for any comments that do not fit into the standard.
Or you could use something like prinf() function provides, where there
are placeholders for specific data in the string, but the long text
itself is standardized.
For example, "Please email or call when you hear from %s" as a FK and
then just store the %s value in the table.
I guess there are many ways you could go here.
David G.
|||SQL Server 2000 does not support table partitioning. However, if you OLTP
query is simple enough, you might be able to use partitioned view to achieve
a similar result: create serveral tables with the same schema, then create a
view to union them together. If this is possible, then you can use put each
table in its own filegroup and use a filegroup based backup stragtegy.
Regarding reducing backup time, is your database recovery model simple or
full? Have you tried database differential backup?
SQL Server 2005 beta 2 has a table partitioning feature that might help both
your query response time and backup time. Please see this article for some
overview of SQL Server 2005 for DBA:
http://www.microsoft.com/technet/pro...n/sqlydba.mspx
Wei Xiao
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Hello All,
> I need help to figure out what I could do about a big
> issue that we have with our database size.
> Our database easily grows to a size over 250 GB and up.
> And the majority of the data (about 75%) is stored in
> this one table (tb_content)with several columns in which
> we are storing text in its text data type column.
> The database is used for online transaction processing
> application.
> Users connect to the database through a Query application
> to query for a particular row of this big table
> (tb_content). Of course the query inlcudes joining few
> other tables in the database as well. After the result is
> returned to the users, users would update the data in
> serveral tables using the application.
> The concerns are to improve the response time for each
> query and reduce the time that it takes to backup the
> database.
> We were able to improve the query response time by
> implementing Full-text indexing.
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
> content of a database to help to improve the query
> response time and the time that it takes to backup the
> database. Is there a such thing as to create a
> particulare table of a database on a different filegroup?
> How about partitioning a particulare table?
> I appreciate your help!
> Thank you,
> -Mitra
>
>
I need help to figure out what I could do about a big
issue that we have with our database size.
Our database easily grows to a size over 250 GB and up.
And the majority of the data (about 75%) is stored in
this one table (tb_content)with several columns in which
we are storing text in its text data type column.
The database is used for online transaction processing
application.
Users connect to the database through a Query application
to query for a particular row of this big table
(tb_content). Of course the query inlcudes joining few
other tables in the database as well. After the result is
returned to the users, users would update the data in
serveral tables using the application.
The concerns are to improve the response time for each
query and reduce the time that it takes to backup the
database.
We were able to improve the query response time by
implementing Full-text indexing.
Any suggestions or recommendations that would help to
reduce the size of a table that holds 75%-80% of the data
content of a database to help to improve the query
response time and the time that it takes to backup the
database. Is there a such thing as to create a
particulare table of a database on a different filegroup?
How about partitioning a particulare table?
I appreciate your help!
Thank you,
-Mitra
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
Have you considered normalizing your data instead of storing it as a big
blob of text? This would almost certainly result in a lot of the
performance increase and size decrease you're looking for.
|||Hello Adam,
You mentioned:
>Have you considered normalizing your data instead of
storing it as a big
>blob of text?
our table, tb_content, only have three columns:
Create Table tb_content
(
id int, --PK
size int, -- size of the content
content text -- the text of the messages
)
This table is normalized.
Thanks,
-Mitra
>--Original Message--
>"Mitra Fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message[vbcol=seagreen]
>news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
data
> Have you considered normalizing your data instead of
storing it as a big
>blob of text? This would almost certainly result in a
lot of the
>performance increase and size decrease you're looking
for.
>
>.
>
|||"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> This table is normalized.
What are you storing in the contents column? Please post a few rows of
sample data.
|||Here is a sample data:
id_col size_col content_col
1 24 Please review the notes.
2 46 Please email or call me when you
hear from Bob.
3 59 Did you hear the new news
about John moving to a new place.
We are storing the message body of emails in text in the
content column.
Please note the issue with this table seems to be that we
have too many rows (millions or billions)that leads to
75%-80% of the size of the database.
Thank you,
-Mitra
>--Original Message--
>
>"mitra fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> What are you storing in the contents column? Please
post a few rows of
>sample data.
>
>.
>
|||mitra fatolahi wrote:[vbcol=seagreen]
> Hello Adam,
> You mentioned:
>
> our table, tb_content, only have three columns:
> Create Table tb_content
> (
> id int, --PK
> size int, -- size of the content
> content text -- the text of the messages
> )
> This table is normalized.
> Thanks,
> -Mitra
Despite the fact that the table consumes 75% of the overall database
size, what issue or issues are you having with it? You can move the Text
column to another filegroup if you want with the TEXTIMAGE_ON {
filegroup | DEFAULT } option in Create Table. Or you can move the whole
table.
You can also save some the smaller text data in the row itself and the
larger text data using a pointer to the data using the the
sp_tableoption text in row function if performance is a concern.
If the table is highly-transactional, then consider moving it to a
mirrored drive array instead of a RAID 5 array.
You could partition the table into multiple tables using a partitioned
view (see BOL)
Other ways to reduce size may be to use a clustered PK in the ID column
instead of a non-clustered index or compress the text data and store as
binary.
David G.
|||Okay, your table certainly is normalized. I misunderstood what kind of data
you were storing.
Unless you can delete/archive some of the older data in the table, there's
really not a lot you can do to improve this situation. You could
potentially speed up queries by adding a SMALLDATETIME column and allowing
(or forcing) users to query based on date as well as text. You could also
potentially speed things up a bit using the "text in row" option (look up in
BOL for more information).
As for speed of backup, that's fully dependant upon data size. However, you
could consider using a third-party backup tool with built-in compression,
which would probably help quite a bit. Have you tried SQL Lite Speed (
http://www.imceda.com/LiteSpeed_Description.htm )? It's an excellent
product and really speeds up backups.
"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ead01c48ec1$b7d33100$a601280a@.phx.gbl...
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
>
|||mitra fatolahi wrote:
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
In addition to my other comments (in my other post), have you considered
storing the text as IDs into a table of valid comments. If you can at
least fit some of the common comments into a consolidated list, you can
just add a FK to the comments table. You could then use a text column
for any comments that do not fit into the standard.
Or you could use something like prinf() function provides, where there
are placeholders for specific data in the string, but the long text
itself is standardized.
For example, "Please email or call when you hear from %s" as a FK and
then just store the %s value in the table.
I guess there are many ways you could go here.
David G.
|||SQL Server 2000 does not support table partitioning. However, if you OLTP
query is simple enough, you might be able to use partitioned view to achieve
a similar result: create serveral tables with the same schema, then create a
view to union them together. If this is possible, then you can use put each
table in its own filegroup and use a filegroup based backup stragtegy.
Regarding reducing backup time, is your database recovery model simple or
full? Have you tried database differential backup?
SQL Server 2005 beta 2 has a table partitioning feature that might help both
your query response time and backup time. Please see this article for some
overview of SQL Server 2005 for DBA:
http://www.microsoft.com/technet/pro...n/sqlydba.mspx
Wei Xiao
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Hello All,
> I need help to figure out what I could do about a big
> issue that we have with our database size.
> Our database easily grows to a size over 250 GB and up.
> And the majority of the data (about 75%) is stored in
> this one table (tb_content)with several columns in which
> we are storing text in its text data type column.
> The database is used for online transaction processing
> application.
> Users connect to the database through a Query application
> to query for a particular row of this big table
> (tb_content). Of course the query inlcudes joining few
> other tables in the database as well. After the result is
> returned to the users, users would update the data in
> serveral tables using the application.
> The concerns are to improve the response time for each
> query and reduce the time that it takes to backup the
> database.
> We were able to improve the query response time by
> implementing Full-text indexing.
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
> content of a database to help to improve the query
> response time and the time that it takes to backup the
> database. Is there a such thing as to create a
> particulare table of a database on a different filegroup?
> How about partitioning a particulare table?
> I appreciate your help!
> Thank you,
> -Mitra
>
>
Issue with a table that is 75%-80% of the database size
Hello All,
I need help to figure out what I could do about a big
issue that we have with our database size.
Our database easily grows to a size over 250 GB and up.
And the majority of the data (about 75%) is stored in
this one table (tb_content)with several columns in which
we are storing text in its text data type column.
The database is used for online transaction processing
application.
Users connect to the database through a Query application
to query for a particular row of this big table
(tb_content). Of course the query inlcudes joining few
other tables in the database as well. After the result is
returned to the users, users would update the data in
serveral tables using the application.
The concerns are to improve the response time for each
query and reduce the time that it takes to backup the
database.
We were able to improve the query response time by
implementing Full-text indexing.
Any suggestions or recommendations that would help to
reduce the size of a table that holds 75%-80% of the data
content of a database to help to improve the query
response time and the time that it takes to backup the
database. Is there a such thing as to create a
particulare table of a database on a different filegroup?
How about partitioning a particulare table?
I appreciate your help!
Thank you,
-Mitra"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
Have you considered normalizing your data instead of storing it as a big
blob of text? This would almost certainly result in a lot of the
performance increase and size decrease you're looking for.|||Hello Adam,
You mentioned:
>Have you considered normalizing your data instead of
storing it as a big
>blob of text?
our table, tb_content, only have three columns:
Create Table tb_content
(
id int, --PK
size int, -- size of the content
content text -- the text of the messages
)
This table is normalized.
Thanks,
-Mitra
>--Original Message--
>"Mitra Fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
>> Any suggestions or recommendations that would help to
>> reduce the size of a table that holds 75%-80% of the
data
> Have you considered normalizing your data instead of
storing it as a big
>blob of text? This would almost certainly result in a
lot of the
>performance increase and size decrease you're looking
for.
>
>.
>|||"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> This table is normalized.
What are you storing in the contents column? Please post a few rows of
sample data.|||Here is a sample data:
id_col size_col content_col
1 24 Please review the notes.
2 46 Please email or call me when you
hear from Bob.
3 59 Did you hear the new news
about John moving to a new place.
We are storing the message body of emails in text in the
content column.
Please note the issue with this table seems to be that we
have too many rows (millions or billions)that leads to
75%-80% of the size of the database.
Thank you,
-Mitra
>--Original Message--
>
>"mitra fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
>> This table is normalized.
> What are you storing in the contents column? Please
post a few rows of
>sample data.
>
>.
>|||mitra fatolahi wrote:
> Hello Adam,
> You mentioned:
>> Have you considered normalizing your data instead of storing it as a
>> big blob of text?
> our table, tb_content, only have three columns:
> Create Table tb_content
> (
> id int, --PK
> size int, -- size of the content
> content text -- the text of the messages
> )
> This table is normalized.
> Thanks,
> -Mitra
>> --Original Message--
>> "Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in
>> message news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
>> Any suggestions or recommendations that would help to
>> reduce the size of a table that holds 75%-80% of the data
>> Have you considered normalizing your data instead of storing it
>> as a big blob of text? This would almost certainly result in a lot
>> of the performance increase and size decrease you're looking for.
>>
>> .
Despite the fact that the table consumes 75% of the overall database
size, what issue or issues are you having with it? You can move the Text
column to another filegroup if you want with the TEXTIMAGE_ON {
filegroup | DEFAULT } option in Create Table. Or you can move the whole
table.
You can also save some the smaller text data in the row itself and the
larger text data using a pointer to the data using the the
sp_tableoption text in row function if performance is a concern.
If the table is highly-transactional, then consider moving it to a
mirrored drive array instead of a RAID 5 array.
You could partition the table into multiple tables using a partitioned
view (see BOL)
Other ways to reduce size may be to use a clustered PK in the ID column
instead of a non-clustered index or compress the text data and store as
binary.
David G.|||Okay, your table certainly is normalized. I misunderstood what kind of data
you were storing.
Unless you can delete/archive some of the older data in the table, there's
really not a lot you can do to improve this situation. You could
potentially speed up queries by adding a SMALLDATETIME column and allowing
(or forcing) users to query based on date as well as text. You could also
potentially speed things up a bit using the "text in row" option (look up in
BOL for more information).
As for speed of backup, that's fully dependant upon data size. However, you
could consider using a third-party backup tool with built-in compression,
which would probably help quite a bit. Have you tried SQL Lite Speed (
http://www.imceda.com/LiteSpeed_Description.htm )? It's an excellent
product and really speeds up backups.
"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ead01c48ec1$b7d33100$a601280a@.phx.gbl...
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
>|||mitra fatolahi wrote:
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
In addition to my other comments (in my other post), have you considered
storing the text as IDs into a table of valid comments. If you can at
least fit some of the common comments into a consolidated list, you can
just add a FK to the comments table. You could then use a text column
for any comments that do not fit into the standard.
Or you could use something like prinf() function provides, where there
are placeholders for specific data in the string, but the long text
itself is standardized.
For example, "Please email or call when you hear from %s" as a FK and
then just store the %s value in the table.
I guess there are many ways you could go here.
--
David G.|||SQL Server 2000 does not support table partitioning. However, if you OLTP
query is simple enough, you might be able to use partitioned view to achieve
a similar result: create serveral tables with the same schema, then create a
view to union them together. If this is possible, then you can use put each
table in its own filegroup and use a filegroup based backup stragtegy.
Regarding reducing backup time, is your database recovery model simple or
full? Have you tried database differential backup?
SQL Server 2005 beta 2 has a table partitioning feature that might help both
your query response time and backup time. Please see this article for some
overview of SQL Server 2005 for DBA:
http://www.microsoft.com/technet/prodtechnol/sql/2005/maintain/sqlydba.mspx
--
Wei Xiao
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Hello All,
> I need help to figure out what I could do about a big
> issue that we have with our database size.
> Our database easily grows to a size over 250 GB and up.
> And the majority of the data (about 75%) is stored in
> this one table (tb_content)with several columns in which
> we are storing text in its text data type column.
> The database is used for online transaction processing
> application.
> Users connect to the database through a Query application
> to query for a particular row of this big table
> (tb_content). Of course the query inlcudes joining few
> other tables in the database as well. After the result is
> returned to the users, users would update the data in
> serveral tables using the application.
> The concerns are to improve the response time for each
> query and reduce the time that it takes to backup the
> database.
> We were able to improve the query response time by
> implementing Full-text indexing.
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
> content of a database to help to improve the query
> response time and the time that it takes to backup the
> database. Is there a such thing as to create a
> particulare table of a database on a different filegroup?
> How about partitioning a particulare table?
> I appreciate your help!
> Thank you,
> -Mitra
>
>
I need help to figure out what I could do about a big
issue that we have with our database size.
Our database easily grows to a size over 250 GB and up.
And the majority of the data (about 75%) is stored in
this one table (tb_content)with several columns in which
we are storing text in its text data type column.
The database is used for online transaction processing
application.
Users connect to the database through a Query application
to query for a particular row of this big table
(tb_content). Of course the query inlcudes joining few
other tables in the database as well. After the result is
returned to the users, users would update the data in
serveral tables using the application.
The concerns are to improve the response time for each
query and reduce the time that it takes to backup the
database.
We were able to improve the query response time by
implementing Full-text indexing.
Any suggestions or recommendations that would help to
reduce the size of a table that holds 75%-80% of the data
content of a database to help to improve the query
response time and the time that it takes to backup the
database. Is there a such thing as to create a
particulare table of a database on a different filegroup?
How about partitioning a particulare table?
I appreciate your help!
Thank you,
-Mitra"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
Have you considered normalizing your data instead of storing it as a big
blob of text? This would almost certainly result in a lot of the
performance increase and size decrease you're looking for.|||Hello Adam,
You mentioned:
>Have you considered normalizing your data instead of
storing it as a big
>blob of text?
our table, tb_content, only have three columns:
Create Table tb_content
(
id int, --PK
size int, -- size of the content
content text -- the text of the messages
)
This table is normalized.
Thanks,
-Mitra
>--Original Message--
>"Mitra Fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
>> Any suggestions or recommendations that would help to
>> reduce the size of a table that holds 75%-80% of the
data
> Have you considered normalizing your data instead of
storing it as a big
>blob of text? This would almost certainly result in a
lot of the
>performance increase and size decrease you're looking
for.
>
>.
>|||"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
> This table is normalized.
What are you storing in the contents column? Please post a few rows of
sample data.|||Here is a sample data:
id_col size_col content_col
1 24 Please review the notes.
2 46 Please email or call me when you
hear from Bob.
3 59 Did you hear the new news
about John moving to a new place.
We are storing the message body of emails in text in the
content column.
Please note the issue with this table seems to be that we
have too many rows (millions or billions)that leads to
75%-80% of the size of the database.
Thank you,
-Mitra
>--Original Message--
>
>"mitra fatolahi" <anonymous@.discussions.microsoft.com>
wrote in message
>news:2ddf01c48eb9$45515ab0$a601280a@.phx.gbl...
>> This table is normalized.
> What are you storing in the contents column? Please
post a few rows of
>sample data.
>
>.
>|||mitra fatolahi wrote:
> Hello Adam,
> You mentioned:
>> Have you considered normalizing your data instead of storing it as a
>> big blob of text?
> our table, tb_content, only have three columns:
> Create Table tb_content
> (
> id int, --PK
> size int, -- size of the content
> content text -- the text of the messages
> )
> This table is normalized.
> Thanks,
> -Mitra
>> --Original Message--
>> "Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in
>> message news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
>> Any suggestions or recommendations that would help to
>> reduce the size of a table that holds 75%-80% of the data
>> Have you considered normalizing your data instead of storing it
>> as a big blob of text? This would almost certainly result in a lot
>> of the performance increase and size decrease you're looking for.
>>
>> .
Despite the fact that the table consumes 75% of the overall database
size, what issue or issues are you having with it? You can move the Text
column to another filegroup if you want with the TEXTIMAGE_ON {
filegroup | DEFAULT } option in Create Table. Or you can move the whole
table.
You can also save some the smaller text data in the row itself and the
larger text data using a pointer to the data using the the
sp_tableoption text in row function if performance is a concern.
If the table is highly-transactional, then consider moving it to a
mirrored drive array instead of a RAID 5 array.
You could partition the table into multiple tables using a partitioned
view (see BOL)
Other ways to reduce size may be to use a clustered PK in the ID column
instead of a non-clustered index or compress the text data and store as
binary.
David G.|||Okay, your table certainly is normalized. I misunderstood what kind of data
you were storing.
Unless you can delete/archive some of the older data in the table, there's
really not a lot you can do to improve this situation. You could
potentially speed up queries by adding a SMALLDATETIME column and allowing
(or forcing) users to query based on date as well as text. You could also
potentially speed things up a bit using the "text in row" option (look up in
BOL for more information).
As for speed of backup, that's fully dependant upon data size. However, you
could consider using a third-party backup tool with built-in compression,
which would probably help quite a bit. Have you tried SQL Lite Speed (
http://www.imceda.com/LiteSpeed_Description.htm )? It's an excellent
product and really speeds up backups.
"mitra fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:2ead01c48ec1$b7d33100$a601280a@.phx.gbl...
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
>|||mitra fatolahi wrote:
> Here is a sample data:
> id_col size_col content_col
> 1 24 Please review the notes.
> 2 46 Please email or call me when you
> hear from Bob.
> 3 59 Did you hear the new news
> about John moving to a new place.
> We are storing the message body of emails in text in the
> content column.
> Please note the issue with this table seems to be that we
> have too many rows (millions or billions)that leads to
> 75%-80% of the size of the database.
> Thank you,
> -Mitra
In addition to my other comments (in my other post), have you considered
storing the text as IDs into a table of valid comments. If you can at
least fit some of the common comments into a consolidated list, you can
just add a FK to the comments table. You could then use a text column
for any comments that do not fit into the standard.
Or you could use something like prinf() function provides, where there
are placeholders for specific data in the string, but the long text
itself is standardized.
For example, "Please email or call when you hear from %s" as a FK and
then just store the %s value in the table.
I guess there are many ways you could go here.
--
David G.|||SQL Server 2000 does not support table partitioning. However, if you OLTP
query is simple enough, you might be able to use partitioned view to achieve
a similar result: create serveral tables with the same schema, then create a
view to union them together. If this is possible, then you can use put each
table in its own filegroup and use a filegroup based backup stragtegy.
Regarding reducing backup time, is your database recovery model simple or
full? Have you tried database differential backup?
SQL Server 2005 beta 2 has a table partitioning feature that might help both
your query response time and backup time. Please see this article for some
overview of SQL Server 2005 for DBA:
http://www.microsoft.com/technet/prodtechnol/sql/2005/maintain/sqlydba.mspx
--
Wei Xiao
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mitra Fatolahi" <anonymous@.discussions.microsoft.com> wrote in message
news:008d01c48eb2$150f1790$a401280a@.phx.gbl...
> Hello All,
> I need help to figure out what I could do about a big
> issue that we have with our database size.
> Our database easily grows to a size over 250 GB and up.
> And the majority of the data (about 75%) is stored in
> this one table (tb_content)with several columns in which
> we are storing text in its text data type column.
> The database is used for online transaction processing
> application.
> Users connect to the database through a Query application
> to query for a particular row of this big table
> (tb_content). Of course the query inlcudes joining few
> other tables in the database as well. After the result is
> returned to the users, users would update the data in
> serveral tables using the application.
> The concerns are to improve the response time for each
> query and reduce the time that it takes to backup the
> database.
> We were able to improve the query response time by
> implementing Full-text indexing.
> Any suggestions or recommendations that would help to
> reduce the size of a table that holds 75%-80% of the data
> content of a database to help to improve the query
> response time and the time that it takes to backup the
> database. Is there a such thing as to create a
> particulare table of a database on a different filegroup?
> How about partitioning a particulare table?
> I appreciate your help!
> Thank you,
> -Mitra
>
>
Subscribe to:
Posts (Atom)