Re: Order by and timestamp

From: Björn Lundin <b(dot)f(dot)lundin(at)gmail(dot)com>
To: Steven Lembark <lembark(at)wrkhors(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Order by and timestamp
Date: 2020-03-16 08:41:02
Message-ID: 37D93689-47B2-4C73-9FAB-65FC820C345F@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> (1) Suggest using "pastebin.com <http://pastebin.com/>" for this kind of data. It may not
> look very pretty -- or readable at all -- on the viewer's end
> depending on their settings (see below for example).

Ok, sorry about that.

https://pastebin.com/2XANMcF6 <https://pastebin.com/2XANMcF6>
Odds rows market with ** at the end of the rows

>
> (3) "Old database" might mean anyting. Provide the PG version
> it was created in and the one you are using along with the
> result of "\d+" in the current database.

version
------------------------------------------------------------------------------------------------
PostgreSQL 9.4.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit
(1 rad)

bnl(at)ibm2:~$ uname -a
Linux ibm2 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux

bnl=> \d+
Lista med relationer
Schema | Namn | Typ | Ägare | Storlek | Beskrivning
--------+----------------+---------+-------+------------+----------------------------
public | abets | tabell | bnl | 62 MB | Bets
public | abets_found | tabell | bnl | 702 MB |
public | adiff | tabell | bnl | 0 bytes | Price diff between 1 and 2
public | aevents | tabell | bnl | 968 kB | collected runners
public | amarkets | tabell | bnl | 15 MB | collected runners
public | aprices | tabell | bnl | 122 MB | runners odds
public | apriceshistory | tabell | bnl | 95 GB | runners odds during race
public | arunners | tabell | bnl | 124 MB | collected runners
public | bet_id_serial | sekvens | bnl | 8192 bytes |
(9 rader)

> (4) Classic causes of this are a botched index. Depending on the
> size you might just want to either drop and re-add the
> indexes or export and reload the table (e.g., \copy to ...
> + truncate + \copy from ...). The point there would be
> fully rebuilding the table and index structure.

But there is no index on startts
I’ll try that later on.

> (6) Don't gamble on horses, play the stock market instead: It
> sounds fancier and you can loose much more money much more
> quickly... er... yeah.

I can guarantee you that you can loose on horses in any rate you prefer. :-)

> What this looks like on my end. Feel free to try and make sense
> of it yourself.

Ok - point taken.

--
Björn Lundin
b(dot)f(dot)lundin(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Björn Lundin 2020-03-16 08:49:23 Re: Order by and timestamp
Previous Message Laurenz Albe 2020-03-16 07:49:18 Re: Invalid byte sequence errors on DB restore