Recent posts
The newest topics and replies across all categories.
| Post | Posted |
|---|---|
For grades, that's fine. If it's money, don't use floats at all. Keep integer cents or use decimal.Decimal, and construct it from strings: Decimal("0.1"). Decimal(0.1) has the float's error in it alre… | by lintroller !-TjZOnKc |
No, it's how floats work. Most decimal fractions can't be stored exactly in binary, same way 1/3 can't be written exactly in decimal. Try 0.1 + 0.2 in Python. For display use round(x, 2) or a format s… | by mo |
Adding up marks that have decimals and then the total is sometimes 79.99999999 instead of 80. Is my computer broken? The numbers are like 12.1 and 7.3. | by bea |
Off. All good now, marking this one resolved. | by nils !PxNS1ZCy |
You can leave it on and raise jit_above_cost, or turn it off for that role. For a small OLTP box I'd just turn it off. | by marta_k !izYA-5cv |
880ms. Old package was built without LLVM support, turns out. Debian's has it. | by nils !PxNS1ZCy |
There's your extra second. It has decided the query's expensive enough to compile. Was jit off in your old config, or was it a different package build? Try SET jit = off in the session and run it agai… | by marta_k !izYA-5cv |
Top of it is: JIT: Functions: 42 Options: Inlining true, Optimization true, Expressions true, Deforming true Timing: Generation 8.1 ms, Inlining 310.2 ms, Optimization 612.4 ms, Emission 201.9 ms, Tot… | by nils !PxNS1ZCy |
EXPLAIN (ANALYZE, BUFFERS) it and paste it. Change the table names if you need to. | by marta_k !izYA-5cv |
Back to 20ms on most of it. Thanks. Still one report query that's slower than before, 2s where it was 900ms. | by nils !PxNS1ZCy |
The in-stages version does a very rough pass first, so the worst of it clears up fast. Then finer passes. Check pg_stat_user_tables, last_analyze should be getting filled in. | by marta_k !izYA-5cv |
Running. There's a line about it in the output I had scrolled past. | by nils !PxNS1ZCy |
Oh. | by nils !PxNS1ZCy |
Did you run the analyze step? pg_upgrade doesn't bring the planner statistics across, so right now it's guessing. It prints this at the end and everybody misses it. vacuumdb --all --analyze-in-stages | by marta_k !izYA-5cv |
Upgraded a small Postgres box over the weekend with pg_upgrade --link. It came up fine, no errors. Queries that took 20ms now take 8 seconds. Same hardware, same config carried across. One example doe… | by nils !PxNS1ZCy |
vek you have never had to explain a CGI to someone who just wants the bank site to load. | by kettle |
Write a one-button CGI that comments out the include. Thirty lines. | by vek |
That's the correct reason. Pi-hole forwarding to local unbound is a common setup, nothing weird about it. | by rproxy |
didn't know for-in order was random until a diff of two runs was different. pipe to sort every time | by wren |
Already have the unbound blocklist from my other post. The argument for adding Pi-hole seems to be the web page, so my partner can turn it off without asking me. That might be worth it by itself. | by kettle |
this is the good kind of thread | by vek |
For the sake of tradition: perl -F, -lane '$s{$F[0]}+=$F[1]; END{print "$_ $s{$_}" for sort keys %s}' data.csv | by old_perl_guy |
bump again. anyone? | by pbj |
I use this about twice a week and never see anyone else use it. awk -F, '{s[$1]+=$2} END {for (k in s) print k, s[k]}' data.csv Add | sort -k2 -n for ranked output. It breaks on quoted commas, so it's… | by awkward |
Yes, _physics_process runs at a fixed rate, and newer versions have physics interpolation you switch on in the project settings. Solved, thanks jf. | by teo |