Systems | Development | Analytics | API | Testing

April 2022

MongoDB vs. PostgreSQL: Detailed Comparison of Database Structures

One of the most important parts of the function of any company is a secure database. With phishing attacks, malware, and other threats on the rise, it is essential that you make the right choice in order to keep your data safe and process it effectively. However, it can be extremely difficult to choose among the wide variety of database solutions on the market today. Two commonly-used options are Mongodb and Postgresql. What do you need to know about MongoDB vs. PostgreSQL?

SQL Puzzle Optimization: The UDTF Approach For A Decay Function

How do you implement a decay function in SQL? You can use window functions, which scale better than joins, or better yet, you can try what Felipe Hoffa did: use tabular UDFs. In this video, Felipe shows you how you can use a tabular UDF to write custom code that can analyze a table row by row while preserving state. Felipe wrote a table UDF in JavaScript that uses a low amount of memory to keep track of the decaying values. He was able to run it in 36 seconds, instead of the 46 seconds that the SQL with windows solution took; and then he optimized the JavaScript even further and ran it in just 9 seconds.