hi all
i want to create a program that each thread will be handle a part of the log file and read from it at the same time ??
Thanks in advance
Jump to PostWell, OK, you can do that. If this is a follow-on to you still unsolved "handling large files" topic then messing about with how you read the logs isn't going to make any real difference - it's the SQL that needs to be optimised. You may get the best throughput …
Well, OK, you can do that. If this is a follow-on to you still unsolved "handling large files" topic then messing about with how you read the logs isn't going to make any real difference - it's the SQL that needs to be optimised. You may get the best throughput by having one thread reading the log and placing entries on a blocking queue, with one or more threads taking enries from the queue to update the database.
Maybe you can clarify exactly what you are trying to do, and exactly what help you need?
thanks for replay
i inserted one million row every 20 minutes so i think there is no problem with data base but if more than one process reads from the log and inserted to the database it will make it faster donot you think???
I'm goint to stick with what I suggested in my previous post. Have a single thread reading the log, and experiment to find the optimum number of threads updating the database. Have a look at the Oracle tutorial on Java Threads, and the API doc for LinkedBlockingQueue
i just want to see or try if it will make any difference in the number of records inserted iam still searching for the best solution
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.