From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Siarhei D <siarhei(dot)damanau(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: compile cube extension with float4 precision storing |
Date: | 2020-06-19 17:30:30 |
Message-ID: | 20200619173030.l3smiu3c3yp6ut2j@development |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 12, 2020 at 02:41:08PM +0300, Siarhei D wrote:
>Is it possible to make cube extension with float(4bytes) precision instead
>of double(8bytes)?
>
>I use cube extension for storing embedding vectors and calculation distance
>on them. During comparing vectors, a 4byte float precision is enough.
>Storing 8 byte double precision is wasting disk space.
>
>Now to avoid disk wasting I store vectors as real[] array and create cube
>objects on the fly. But this solution is wasting cpu time
>
I don't think there's a built-in support for that, so the only option I
can think of is creating your own cube "copy" extension using float4.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-06-19 18:11:25 | Re: Creating a function for exposing memory usage of backend process |
Previous Message | Peter Geoghegan | 2020-06-19 17:28:56 | Re: Failures with installcheck and low work_mem value in 13~ |