Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDlJC-0005Ru-Mf for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 08:41:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDlJB-0006Od-52 for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 08:41:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDlJA-0006OV-N2 for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2020 08:41:12 +0000 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jDlJ3-0001Af-GC for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2020 08:41:12 +0000 Received: by mail-lf1-x143.google.com with SMTP id b186so13146003lfg.11 for ; Mon, 16 Mar 2020 01:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=tlhNmCKSgzOXe+n5BbB4stwTWMyU/PoQa7JtBdrlVss=; b=si0pG40xfFCKc59GYtdDjF7qkCunKCc4YXwKne6wctRccLexTQ5N00BiA3XfhJ2r6e 1cczRjOmKckCmdhmVCcbA0/IR9dezoW2IBPSqBvmfTLBaGz37o+cb/n9QsxkpNXglBPb hmYNu0ruf/M6dKl+TD7boaJXwaZnAHF/4qnClSR5ILvm5GETzcwnMQryOr1789pXPG4K NS98rLLBq5FklTtBlxJJypHP7SabQm85UmqI6xIxDCMt6Z0YTYc8ehrRdtjUo8BmYUFe sqmVIOpcS+JTh92eRDITGF7hCpN2/D86Dl5QJOHKE6o9NOiS9XOyDbVCQaOA4YMAXdJI sMzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=tlhNmCKSgzOXe+n5BbB4stwTWMyU/PoQa7JtBdrlVss=; b=A6RMRFwueQ6kJpqufmr9HGFWKc33pAtfAvGkSbIgLS294SjOIFaZMZ6K3WFPHbFL1h BoZqhhbXBfRQZd3/wwbYwzT/uFMbDtliKxz0uM1Tk/0BSHXcZttCUBs1bM01uKLP7opn WlmbvNvbJnIWtnwUFgsXMfB+a5e11D0JKzZCgGUGNGiGB6Lj/vUozpFjnKPi36LRwcp7 mbuX73oKSMtwnXqOe4Db7owi6HMQBOQvRVroMhLKsnLGXJddtd0uw25dRc+CBpVrYHjC DhMH2uAnufcnL4DTEHG6cGvX/MbtkF5y8VqlwpOVpVFEUCWDh1qZht5gWUdJbxyKF3KR Ya6w== X-Gm-Message-State: ANhLgQ2nPXah7+pds3Vas54uYQKghhEoeEAHgiuRO7lkJLIo2jLY2cBp IoR4fU/vjWcRs3PAsH/B5rLSXSSd8CE= X-Google-Smtp-Source: ADFU+vsWU0AMWYsFAf+gmeOfkIxp6vAW344vV5r1lJIHbrqpOik7WhMop86zZ0kqpMal+oQEo2wcRA== X-Received: by 2002:ac2:5c5c:: with SMTP id s28mr3657854lfp.100.1584348064290; Mon, 16 Mar 2020 01:41:04 -0700 (PDT) Received: from imac.lan (81-227-64-79-no276.tbcn.telia.com. [81.227.64.79]) by smtp.gmail.com with ESMTPSA id q4sm24429524lfp.18.2020.03.16.01.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Mar 2020 01:41:03 -0700 (PDT) From: =?utf-8?Q?Bj=C3=B6rn_Lundin?= Message-Id: <37D93689-47B2-4C73-9FAB-65FC820C345F@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_16178E22-D7C2-4731-973C-4D89E784A63A" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Order by and timestamp Date: Mon, 16 Mar 2020 09:41:02 +0100 In-Reply-To: <20200315164835.4ba454b1.lembark@wrkhors.com> Cc: pgsql-general@lists.postgresql.org To: Steven Lembark References: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com> <20200315164835.4ba454b1.lembark@wrkhors.com> X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_16178E22-D7C2-4731-973C-4D89E784A63A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >=20 > (1) Suggest using "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. =20 https://pastebin.com/2XANMcF6 Odds rows market with ** at the end of the rows >=20 > (3) "Old database" might mean anyting. Provide the PG version=20 > it was created in and the one you are using along with the > result of "\d+" in the current database.=20 version = =20 = --------------------------------------------------------------------------= ---------------------- 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@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=3D> \d+ Lista med relationer Schema | Namn | Typ | =C3=84gare | Storlek | = Beskrivning =20 = --------+----------------+---------+-------+------------+-----------------= ----------- public | abets | tabell | bnl | 62 MB | Bets public | abets_found | tabell | bnl | 702 MB |=20 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 |=20 (9 rader) > (4) Classic causes of this are a botched index. Depending on the=20 > size you might just want to either drop and re-add the=20 > indexes or export and reload the table (e.g., \copy to ... > + truncate + \copy from ...). The point there would be=20 > fully rebuilding the table and index structure.=20 But there is no index on startts I=E2=80=99ll try that later on.=20 > (6) Don't gamble on horses, play the stock market instead: It=20 > 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=C3=B6rn Lundin b.f.lundin@gmail.com --Apple-Mail=_16178E22-D7C2-4731-973C-4D89E784A63A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

(1) Suggest using "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.  

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@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=3D> \d+
          =                     =   Lista med relationer
 Schema |      Namn      | =   Typ   | =C3=84gare |  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=E2=80=99ll 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=C3=B6rn Lundin




= --Apple-Mail=_16178E22-D7C2-4731-973C-4D89E784A63A--