Sergey strikes again: Trustly developer wins Sweden’s SQL Server competition

For the second time in a row, Sergey Klimkevich, a database developer at Trustly, has won the SQL Server challenge organized by Sqlug.se, the Swedish SQL Server user group.

This year’s challenge tasked participants with identifying the payments of specific customers, even if the customer’s personal data had changed. Participants had one month to write code that solves the problem and each participant could submit up to three entries. Upon submission, participants were notified if their solution was correct and were given an approximate ranking compared to the others.

“I didn’t use aggregate functions, which was the obvious choice for many others,” he explained. “I took another approach working with in-memory structures. That approach costs a lot of time upfront but turned out to be the fastest in the end.” When he submitted his final entry, he was estimated around third place, but he had high hopes because he knew he was making tradeoffs.

All in all, there were 55 submissions from 28 different people. Sergey’s solution took 28 seconds, beating out second place by just one second. “The competitors at this level are highly skilled, so it’s no wonder the margins are small,” Sergey added.

Sergey has been competing in the SQL Server competition since its inception in 2010 and has placed third three times (2010, 2011, 2014). After winning the previous competition held in 2015, he thought about giving PostgreSQL a shot.

“As relational databases, SQL Server and PostgreSQL have many things in common, but there are a lot of technical differences,” he explained. “I like PostgreSQL; it’s flexible, feature-rich and fun to work with.”

Six months ago, Sergey joined Trustly, where the entire back-end system is written using stored procedures in PostgreSQL (mainly PL/pgSQL but also pure SQL and PL/Perl). We’re thrilled to have him aboard our database team and incredibly proud of his accomplishments in the challenge.

As for next year’s competition? “I’ll definitely be back,” he said.

  • branding