Month: May 2018

Missing indexes in Oracle

Some little details cause trouble entirely disproportionate to their importance. One such thing is a little quirk in how Oracle handles indexes. I have some code which gets a list of tables using a particular criteria and then gets all of the indexes associated with those tables. Under normal circumstances, the code works fine. However, when testing in a clean database, it will completely fail to find any of the associated indexes, even though they’ve been verified to exist. …or have they? It turns out that when the corresponding table does not contain any data, the index may still be associated with the table but it doesn’t really exist. So when you run a query like this: select * from dba_indexes ind join dba_segments s on ind.index_name=s.segment_name where ind.table_name=’MYTABLE’ It returns no results. Cue confusion. Adding a row to the table causes the index to actually be created and allows my script to start working correctly. Share on...

Read More

Being Matt

When I first started working as a developer over seven years ago, it was a bit overwhelming. Not only had I never worked as a programmer or used any of the languages I’d now need, I also had to get used to a lot of internal tools and processes that often had minimal documentation. It was, in a word, exhausting. Matt was another developer on the team who had already been with the company for half a year, and he was really good at his job. He wasn’t officially my mentor, but he encouraged me to ask questions. I had him as my code reviewer for my first major piece of development, and let’s just say he had a LOT of comments – everything from functional improvements to changes in variable names. It was frustrating, to say the least – but also educational. Having Matt review my code was a great way to learn what good code should look like, and as time went on I would actively seek to have him as my code reviewer whenever I was working on something particularly complicated; having Matt look at my code gave me more confidence that everything was correct. Matt recently passed away from cancer; one of my regrets is that I never got to know him socially. We had several shared interests, but I just haven’t made a practice...

Read More