Skip to content

Tag: performance

Performance impact of view on aggregate function vs result set limiting

The problem Using PostgreSQL 13, I ran into a performance issue selecting the highest id from a view that joins two tables, depending on the select statement I execute. Here’s a sample setup: What I found out I’m executing two statements which result in completely different execution plans and runtimes. The following statement executes in less than 100ms. As far

SPROC with Outer-Apply returns too many rows

I have a complicated enough SPROC, which I modified to return a few more columns (from additional tables). What I wanted is to have this SPROC still to return the same amount of rows and the same data, but to fill in new columns (if data exists) as well, for those rows. My modification does fill new columns, but also

Join two tables bring mismatch values MYSQL

I have two tables with >4million records i need to make a select query with where two columns match bring both tables value on this match and then i will insert that into a 3rth table: This is table A: (bitfinex) This is table B: (Kraken) I need to do a SELECT where timestamp and exchange_pair matches, as you can