Hi All, I create a collection of 4.5 gb xml document. and process some Xquery in sequencial manner then it is taking adequate time to process all queries. But when I converting process to multi threading then it is taking more than 10 times of time. Please someone suggest what is the best way to process Xquey in multithreading model.
MY code is following : Thread thread = new Thread(new XqueryProcessor( new Context(),"db1")); Thread thread1 = new Thread(new XqueryProcessor( new Context(),"db2")); Thread thread2 = new Thread(new XqueryProcessor( new Context(),"db3"));
thread.start(); thread1.start(); thread2.start();
Xquery Processor has all queries which need to process. and db1, db2 ,db3 are basically same xml files three collection.