I am using Alfresco Community Edition 5.0 and Postgresql 9.3.
In our application, we are creating all the documents in the root folder using cmis API.
This led to the slowness in the process of creating or updating the documents in Alfresco.
During document create/update, it is using below query which is taking 5 to 6 seconds to execute.
select assoc.id as id, parentNode.id as parentNodeId, parentNode.version as parentNodeVersion, parentStore.protocol as parentNodeProtocol, parentStore.identifier as parentNodeIdentifier, parentNode.uuid as parentNodeUuid, childNode.id as childNodeId, childNode.version as childNodeVersion, childStore.protocol as childNodeProtocol, childStore.identifier as childNodeIdentifier, childNode.uuid as childNodeUuid, assoc.type_qname_id as type_qname_id, assoc.child_node_name_crc as child_node_name_crc, assoc.child_node_name as child_node_name, assoc.qname_ns_id as qname_ns_id, assoc.qname_localname as qname_localname, assoc.is_primary as is_primary, assoc.assoc_index as assoc_index
from alf_child_assoc assoc join alf_node parentNode on (parentNode.id = assoc.parent_node_id) join alf_store parentStore on (parentStore.id = parentNode.store_id) join alf_node childNode on (childNode.id = assoc.child_node_id) join alf_store childStore on (childStore.id = childNode.store_id)
where parentNode.id = $id
I want to change the root folder(DB) of my alfresco from company home to some other folder.
Is there any configurations present which can help me in changing it?
Will this change resolve my problem?
Any other suggestions are most welcomed which can resolve the same.
a) Using some client application - uploading/updating the documents? what is the client application based on java/python etc..? Also what protocol is used - REST- browser binding/REST atom pub/web services.
b) Can you check if database is causing the delay running a simple cmis GET query using cmisselector = properties or cmisselector =objects
c) Also is there any way you can profile the application using - Yourkit etc so that we know what exactly is taking time.
d) In the query - can you provide the noderef of the folder and not the path where you would like to upload the document.(and see if you get good performance)
e) Try to make direct REST call from POSTman or any REST client:
As advise, don't use / , better, place them under /MyApp/
Besides, you should distribute your documents uploads in some folder structure under your application rootpath.
There is a non-written rule that you should not have more than let's say 1000 documents in each level folder. Then your alfresco queries probably perfom better (or at least something better). Typical intermediate folder structures are yy/MM/dd based and the structure may depend on how many documents you upload per day.
Creation date based is valid for online daily uploads with no more than 1 thousand documents.
If you plan to some bulk upload some days, you can distribute them volume based:
/MyApp/Vol0001/ --> 1000 docs
/MyApp/Vol0002/ --> 1000 docs
Your application must create these hierchies via CMIS for example.