Content pfp
Content
@
https://warpcast.com/~/channel/pg
0 reply
0 recast
0 reaction

Mikko pfp
Mikko
@moo
TIL I had a PostgreSQL database query where block number was float instead of an integer. (This would not ever happen e.g. in JavaScript, but this time we were using the best programming language in the world. Python). Instead of taking under-milliseconds the query took more than ten minutes. I'm not sure if this is because the index match is only for integers, or if PostgreSQL is doing some other unusual behaviour. But this was damned hard to find.
2 replies
0 recast
5 reactions

Colin Charles pfp
Colin Charles
@bytebot
postgres can't efficiently use the btree index during such an implicit typecast. also, don't forget float size is bigger than int - choosing data types matters (even in mysql).
1 reply
0 recast
3 reactions

Mikko pfp
Mikko
@moo
Thank you ser šŸ¤
1 reply
0 recast
1 reaction

Mikko pfp
Mikko
@moo
Instead of https://dba.stackexchange.com/ I will now use @bytebot
1 reply
0 recast
0 reaction