Posts

How you schedule the query in MarkLogic?

Image
You can schedule the task or query through the schedule task page  inside the Group page. You can schedule you to task daily, monthly, once, hour, etc as per requirement. please see the below snippets for your response. Also, you can schedule the task with the help admin function ( admin:group-add-scheduled-task ). Below are the functions to schedule a query basis on the requirement. admin:group-hourly-scheduled-task admin:group-minutely-scheduled-task admin:group-daily-scheduled-task admin:group-weekly-scheduled-task admin:group-monthly-scheduled-task Xquery Code: xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $config := admin:get-configuration() let $task := admin:group-hourly-scheduled-task( "/schedule.xqy", "/Docs", 2, 30, xdmp:database("Documents"), 0, xdmp:user("Jim"), 0) let $ad...

How to measure query Xquery performance in Marklogic?

Image
  First, we can analyze our query by profiling the meter that is given on the Console page. It completely shows line-by-line execution time.  Here you can able to see line-by-line execution time. Based on this execution time you can re-design or tune your query.  Read the complete article here , to know a better understanding of the displayed button on the Profile button on the QConsole page.   Second, we use the  xdmp:query-meters  and  xdmp:query-trace  functions to understand and tune the performance of queries. 

MarkLogic interview: How to measure query Xquery performance?

Image
  Q.1. How to measure query Xquery performance? Ans :   First, we can analysis our query performance by profiling meter that given on Console page. It’s completely show line by line execution time. Below is the screen-shot of profiling meter: Here, you can see exact what's line is taking more time then you can modify your query as  Second, we use use the  xdmp:query-meters  and  xdmp:query-trace  functions to understand and tune the performance of queries. 

MarkLogic interview: What is DLS library in MarkLogic?

  Q.1.  What is DLS library in MarkLogic? Ans :     DLS library is used for maintain the versions of managed document in the Marklogic server. So that your data will be intact in marklogic while performing any insert/update/delete operation on the document. Marklogic create two copy every time, one is final copy after updating document and second old version copy.    Example: You want to insert data into DB with '/books.xml'. You have inserted data with help of  dls :document-insert-and-manage()  and this function creates two uri: one is  '/books.xml',  and second is '/books_version1.xml'  

MarkLogic interview: What is E-node and D-node in the MarkLogic?

  Q.1. What is E-node and D-node in the MarkLogic? Ans:   Evaluator node (e-node) :   E-node that evaluate xquery programs, XCC/XDBC request, and other server request also. E-node also talk with D-node if needs forest data otherwise e-node request evaluated entirely on the e-node. Example-1:   Suppose you run query to do some mathematical calculation and you have no need of forest data, in this case query run entirely on E-Node. Query will not talk with D-node in this case.      Example-2:   Suppose you want extract some forest data, in this case you will run a query on E-node and E-node send a request to D-node for fetching data. D-Node fetch the data and return to E-node.  Data node (D-node):  D-nodes are responsible for maintaining transaction integrity during insert, update and delete operations.  Or we can say D-node is responsible for only data. Example:  if you want to import data without using of E-node, in th...

MarkLogic interview: What is Cluster in Marklogic?

  Q.1. What is Cluster in Marklogic? Clustering :   A combination of multiple  instances of MarkLogic Server machine called a cluster. Each host in a cluster is sometimes called a node, and each node in the cluster has its own copy of all of the configuration information for the entire cluster.

Below are more some questions, we will provide the answers soon

How you deploy your code in MarkLogic. How does MarkLogic support acid transactions in MarkLogic? What is the difference between MarkLogic and other No SQL DB(Mongo DB). How do you write an XQuery that makes rest in your database? What is the means of data governance, and data modeling? What are Fragmentation policies in MarkLogic? What is CPF in MarkLogic? What REST API have you used in your Project.? What is the DHF framework? What is an HTTP request? How do you apply to join Marklogic.?