I'm using alfresco 4.2.c and search queries are too slow, i have about 400.000 files, do you have any ideas about optimizing those queries?
If you don't have any other metadata to select the files in that tree, then "not really". But perhaps the path query can be simplified. Being on 4.2 of course limits this, i.e. in 5.x there is a nice optimization that can be done for selecting files in a specific site without using PATH.
I try not to use only generic file folder structures in projects - when a file is filed in a specific folder there is typically a reason for it, e.g. that it relates to a specific project, customer etc. In that case I will associate some type/aspect/metadata to the file (as well as the folder) which allows me to select it without relying on its path / location.
Is there any possibility for you to migrate to Alfresco 5.0+? That would significantly improve your search speed.
There are many aspects you can tuning to improve search performence ,for example
Tuning alfresco : increase db connections, increase threads number of tomcat ,increase jvm memory.
Tuning solr :incease solr cache size,increase jvm memory.
Tuning db : increase max connections,increase buffer size..
As tunning query language ,it depends on the query language you use.
It's not possible for now.
Don't forget tuning the query itself. It would be great to know the specific queries that are taking a long time. Query complexity and use of certain conditions (PATH, wildcards) can impact performance.
Can i avoid using path queries when i try to search for files under a specific folder in a tree?