index > SQL Server Everywhere Edition > Urgent need for problem of increase in database size for ntext ty...

Urgent need for problem of increase in database size for ntext ty...

I had several databases under sqlserver ce 2.0 (in my Pocket PC) which contained ntext fields. The size of the databases varies from 50,000 to 700,000 records. The size of an ntext field is from 4 bytes to 2 megabytes.

When I recreated my databases under sql server 2005 mobile on my desktop using VS2005 (see my post just under this one), I saw a big difference between the old and new database sizes. This problem was mentioned in one of the posts in this forum and the reply was to replace ntext data with ncharvar type.

Since most of my data was longer than 4000 bytes (which is the limit for nvarchar type), I couldn't use this suggestion. Instead, I changed my ntext type to image type and used a GetByte conversion.

No change! The size of the new database is still 50 % larger than the original. Since the difference is around 300 MB, this is an unacceptable thing.

Now, I either wait from somebody to suggest a new solution (apart from keeping the ntext data in a separate binary file and keep index of the records of this file in the records of sql database) or, most preferably, have

Microsoft solve this problem as soon as possible.
biriktirici

The related story which you already mentioned is @ http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=169637&SiteID=1.

Here are the details:

SQL Mobile 3.0 reserves a data page for Long Value data when data length is more than 256 bytes. NTEXT and IMAGE are long value data types. So, if you have a table with NTEXT/IMAGE column, then SQL Mobile 3.0 creates a data page for each row where the data size is more than 256 bytes. And data page size is typically 4K . If you want to update the NTEXT/IMAGE column, the operation will be very fast and it is by design. Also, whenever there is a data length exceeding 4K (not really 4K but 4K minus some control data size), another data page is allocated. Even if your data value is just 4.1K, 8K is what reserved by SQL Mobile 3.0. Best practice here would be to align your data sizes on 4K boundary.

Note: Page size may not be 4k always. It varies!

Thanks,

Laxmi Narsimha Rao ORUGANTI, SQL Mobile, Microsoft Corporation




Please hit "Yes", if my post answered your question(s). All postings are as-is and confer no rights.
Laxmi NRO MSFT
Thank you very much for your valuable explanation. Let me ask another question:

If I will never update these long value data, and I want my database as compact as possible (such as in SqlServerCE) what can I do? Is there a solution to my problem, or shall I stick to the design and have an increase in size of my databases?

Talat

PS: In the other post you have mentioned, Darren Shaffer said:

"...sent the sample code to recreate this to the SQL Mobile team and will followup with them on this issue and post the results here...."

Hence I think you'd better post this message to the other forum to make the others' mind clear.
biriktirici

I understand your scenario. But I am sorry that SQL Mobile 3.0 can not help you in this regard. However, we would consider this as a customer pain point and would discuss with the team.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation




Please hit "Yes", if my post answered your question(s). All postings are as-is and confer no rights.
Laxmi NRO MSFT
reply 4

You can use google to search for other answers

 

More Articles

• RDA Push Command Failing ...
• Data Access Application Block for SQLClient
• SQL Mobile - Locale Not supported
• SQL 2005 EXPRESS
• SQL 2005 Mobile vs .NET CF 2.0 SP1?
• Should I use Merge Replication ahead 3rd party synch tool
• Can't find PInvoke sqlceme30.dll
• SqlCeConnection guidelines - keep it open?
• limited number of connections to SQLMobile?
• Parameterized queries with RDA
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Connecting Database Engine (SQl server 2
• Inserting Server Collation on a connecti
• Sync of binary columns in SQL 2005 EV an
• sql server mobile 2005 and emulated stor
• IIS Synchronizing Data Error
• access SQL2005 MOBILE database in a VS20
• SqlCePeplication.Synchronize
• sync sql mobile with sql server 2005
• SQL 2005 Mobile : The file is not a vali
• help
• How to add data in sql mobile database f
• Typed sync controller classes
• Failure to create first Replicated Datab
• Is there a limit to Number of SqlCeParam
• Using resultset.IsDBNUll and getting error

Hot Articles

• Very newbie question
• IID_IDBInitialize interface of sql mobil
• SET IDENTITY_INSERT tablename ON
• Views not working
• SQL Server 2005 mobile edition free?
• Delete Update Behavior of the SSEv Engine
• Dates problem in SQL Server Evrywhere ed
• How to deploy SQL Server Everywhere with
• RDA SQL MOBILE ERROR 28037 HResult = -2
• Error when "SELECT" statement
• Wrong version of SQL Server Mobile deplo
• cannot generate ResultSet code
• What does it take to update a SQL Everyw
• Sql Server CE 2.0 Proxy Replication Scen
• operating system does not support encryp

Recommend Articles

• Problem Creating a subscription
• Unable to perform a Manual install of SQ
• Wireless synchronisation
• Making small database on iPaq
• Help Please...request to send data to th
• (SQL Mobile)Can SELECT, but cannot INSER
• An incorrect or unsupported HTTP functio
• ANN: Mobile Database Development Article
• need to edit .sdf files from local desktop
• CREATE INDEX statement for SQL Mobile no
• IID_IDBInitialize interface of sql mobil
• Test deploying WinForms app with SQL/e
• Merge Replication Question
• rda.push error
• Open connection in sql server