About 8 months ago I was hired as the sole developer at a small company to take on a certain project. Although there are other small projects that come up from time to time, I've been spending about 95% of my time over the last 7 months working on this project. At the rate I'm going, I think it will be at least a year and a half before I'm done with what we all hoped would be accomplished within two or three months. My boss seems to be aware of this; it would be impossible not for him to be based on what he's seen so far.
One reason the project is taking so long is because I keep having issues pop up. This project deals with millions of records stored in dozens of different tables. Although I'm as competent as anyone when it comes to databases, I'm by no means a database expert or DBA, so I can't look and a slow query and immediately say, "Oh, yes, it needs an index on X, Y and Z and we need to shard this table and we need to tweak the max_foo setting in the config." It takes me time to figure out what's going on. So far I've solved almost every significant performance issue I've come across, but there are a lot of unique challenges and I can't just become an expert overnight. And the performance issues that haven't been "worth" solving---because it would take me three days to make something run just a touch faster---are peppering my day with all these annoying little waits, where I get held up for 30 seconds but it's not like I can go do 30 seconds worth of meaningful coding somewhere else during that time.
It's possible that this is the kind of project that really deserves a team of 3 developers and a DBA. It could also be that a better or more experienced programmer could handle this project on his own in a reasonable amount of time but my current skills just aren't equal to the task. In any case I feel like I'm in way over my head. I know I can eventually get the project done but it might take a ridiculous amount of time.
It's also quite lonely and discouraging to work on a giant project by yourself with no one else to discuss it with. I'm sure at least some other developers know what I mean. There's no reason for anyone else at the company to care one tiny bit about the ins and outs of the system, and there's no reason for any developer outside of the company to care about the project. The isolation combined with the slow pace is a real motivation killer.
Any advice?

