Hi community,

I would like to know more about the amount of space next fields take in database (cloud version):

For example, Text(250) field holds a string of 70 characters. How much space would it take in bytes? 

What if the value is null?

If we have 20 custom Text columns for Contact object, how much do they affect the performance? For table of 10K-30K rows. And if they are null for bigger amount of contacts?

For the section table (Account, Contact) of 10K-30K rows, what should be... hmm... the strategy of creating new custom fields for better performance? As an option, instead of adding the columns to Contact object we may add them to a separate detail object, but that increases complexity.

Should we consider much about that?

Thank you.

Like 0

Like

1 comments

Dear Yuriy, 

We haven't performed such precised tests, however, the size of the string field is approximately 2 bytes per character. You can perform tests yourself populating columns in sql and evaluating the difference in size of the table. However, the value of the field itself doesn't affects the performance of the system. The amount of columns may affect the performance of the system depending on how often and in which volume you get the data (how many records and how many columns) as it loads an sql to the certain extent. However, 20 text fields shouldn't cause much trouble. There are some ways of optimizing this based on what's said above, e.g. when you use Read Data element in the Business process we recommend to read only columns that are further used in the system. 

Show all comments

Hi Team, 

BPM is running in SQL server and we were planning to change the recovery model of the database to full recovery from simple recovery model for attaining the point in time recovery. As far as I knew it will not affect the BPM. Still wanted to confirm if there is any drawback in doing so. Thank you in advance. 

Gokul

Like 0

Like

2 comments

Dear Gokul,

You will not have any difficulties with the application after changing the recovery model. The only difference that is in the database size. Since it will be bigger, you would need to have more free disc space not to affect system performance. 

Best regards,

Dean

Thank you Dean :)

Show all comments



Hi there,

Can someone please let me where in the CRM are all the attachments stored in the database?

So say if I attach a file in the Attachment and Notes tab in the Contacts section, I know that the Attachments detail is called Contact's Detail but which object holds those attachments in the database?

Thanks,

AK

Like 0

Like

8 comments

Hello,

All files are stored as binary data in the "data" column of the object. Each one is stored in their own column, for example 'ActivityFile'

Best regards,

Angela

Angela Reyes,

 

Is it possible to copy the attachments from one object to another by copying the binary data from "data" column of the object.

 

Regards

Sivanesan

Hi,

If the field "Data" contains a correct value and not something like "0x" then yes, you can take this data and add it to another object.

For example, you can do it inside a business process script task.

 

var fileName = file.GetTypedColumnValue<string>("Name");
            var fileType = file.GetTypedColumnValue<Guid>("TypeId");
            var fileData = file.GetBytesValue("Data");
 
            var fileEntity = new ActivityFile(userConnection);
            fileEntity.SetDefColumnValues();
            fileEntity.SetColumnValue("ActivityId", activity.Id);
            fileEntity.SetColumnValue("TypeId", fileType);
            fileEntity.SetColumnValue("Name", fileName);
            fileEntity.SetColumnValue("Data", fileData);
            fileEntity.Save();

 

Dmytro Vovchenko,

 

Thanks for the response Dmytro. I am trying to copy the attachments from section A to section B. I have used "Add Data" element inside a BP to copy the data from A to B. The BP runs without any issue but when I try to open the same attachment from section B its throwing below error.

When I queried the object the attachments(both the sections) , it just shows the data type(System.Byte[]).

 

Can you please show how exactly you copy data in your bp?

Dmytro Vovchenko,

PFB

 

 

It looks like you cannot use "Add record" and "Read record" in this case because they cannot work with the "Data" type. You really need to use a script-task to read and add file:

        var ESQ = new EntitySchemaQuery(manager, AccountFile);
	    ESQ .AddColumn("Name");
	    ESQ .AddColumn("Data");
	    ESQ .AddColumn("Type");
 
	    var dataQueryResult = ESQ.GetEntityCollection(userConnection);
	    foreach(Entity file in dataQueryResult) {
		    var fileName = file.GetTypedColumnValue<string>("Name");
		    var fileType = file.GetTypedColumnValue<Guid>("TypeId");
		    var fileData = file.GetBytesValue("Data");
 
			var fileEntity = new ContactFile(userConnection);
		    fileEntity.SetDefColumnValues();
		    fileEntity.SetColumnValue("CintactId", contact.Id);
		    fileEntity.SetColumnValue("TypeId", fileType);
		    fileEntity.SetColumnValue("Name", fileName);
		    fileEntity.SetColumnValue("Data", fileData);
		    fileEntity.Save();
	    }

 

Dmytro Vovchenko,

 

I was able achieve it using the "Add data" itself. I missed to update/add the attachment type. After I added it I am able to open the attachment. Thanks for your input.

Show all comments

SysEntitySchemaOperationRight - Access to object operation rights

SysEntitySchemaRecordDefRight - Access to object record default rights setup

EntitySchemaRecRightOperation - Record right operation access level (Read, Edit, Delete)

SysEntitySchemaColumnRight - Access to object column rights

 

SysSettings - System settings

SysSettingsValue - Value of system setting

 

SysAdminOperation – Operation itself

SysAdminOperationGrantee – List of users who have access to execute operation

 

SysWorkplace – List of workplaces

SysAdminUnitInWorkplace - Users (groups) who have access to workplace

SysModuleInWorkplace - Sections in Workplace

 

SysProfileData - Columns setup (bind data by key, ContactId and Culture)

 

SysAdminUnit – Users and user roles (functional and organizational)

SysUserInRole – List of user’s roles

 

SysPackage - list of packages installed in configuration

 

Lookup – list of lookups

Like 3

Like

Share

0 comments
Show all comments