Question: I have an extremely long table with EAV model.
My columns are tipically ID, Timestamp, Value.
Actually I create an index on ID and Timestamp to increase performance in my queries but it seems to be still slow..
What happend if I split the timestamp in separated integer fields and create an index on those fields? Something like this:
Year(Int), Month(Int), Day(Int), Time(TimeStamp), ID, Value. 
Does it increase performance? 
Today I'm using two kind of db, MySql and PostgreSQL but I have the same doubt for both.

Answer: 
`write.lock` file might be present under `solr/{environment}/data/index` directory due to unclean shutdown. Removing `write.lock` file will fix the issue.
I was having this issue even when `write.lock` was not present. Here's what solved it for me:

1) Delete entire /solr directory

2) run `ps -ef|grep solr` to see any solr processes running

3) run `kill -9 [solr pid]` for each of the processes found in step 2

4) run `rake sunspot:solr:start` and then `rake sunspot:solr:reindex`

Hope this helps!