I would like to know the same thing. I'm using 5.1.12 myself. A full
reindex of one of my shards takes 4-6 hours for 7 million rows,
depending on whether I run them one at a time or all at once. If I run
the same query on the same machine with the commandline client and write
the results to a file, it takes 10-15 minutes. I know that reindexing
will never be as fast as a raw data dump, but it does seem like it could
be faster.
I had been using an older release (which I think was 5.1.7, but I can't
remember) that was actually slower than this one. I haven't tried the
5.0.8 version myself. It is well over two years old, so I'm not
surprised it's buggy, especially if everything else (mysql server, java,
etc) is running recent versions.
There is mention in the change log for 5.1.13 (not yet released) about a
performance regression, but when I look at the bug and follow the
references, it sounds like the regression was actually introduced by a
change after 5.1.12, so it may not be any faster.
Regarding the speed problem in 5.1.12, you could try a development
snapshot on a system not in production, which I will also do on mine.
If that doesn't improve the situation, consider filing a bug on the
MySQL connector.
http://downloads.mysql.com/snapshots.php
As far as the error in the 5.0.8 version, does the import work, or does
it fail when the exception is thrown? I have seen a lot of messages
about autoreconnect not working for people, but no bug filed, and from
what I can tell, autoreconnect does work, but throws the exception even
when it's working. You might also try doing as it says and increasing
the timeout on the server.
Thanks,
Shawn
On 5/14/2010 8:56 AM, Blargy wrote:
Which driver is the "best" for use with solr?
I am currently using mysql-connector-java-5.1.12-bin.jar in my production
setting. However I recently tried downgrading and did some quick indexing
using mysql-connector-java-5.0.8-bin.jar and I close to a 2x improvement in
speed!!! Unfortunately I kept getting the following error using the 5.0.8
version:
"Caused by: com.mysql.jdbc.CommunicationsException: The last communications
with the server was 474 seconds ago, which is longer than the server
configured value of 'wait_timeout'. You should consider either expiring
and/or testing connection validity before use in your application,
increasing the server configured values for client timeouts, or using the
Connector/J connection property 'autoReconnect=true' to avoid this problem."
I tried setting the autoReconnect="true" in my datasource configuration but
I keep getting the same error. Any ideas?