Doubt about an array function [Question]

49 views
Skip to first unread message

bocher

unread,
May 6, 2020, 4:58:51 AM5/6/20
to H2 Database
Dear all,

I have the following sql query

CREATE VIEW geomColumns as select t[0] as geometry_type, t[1] srid FROM (SELECT findmetadata(COLUMN_TYPE) AS t from FROM INFORMATION_SCHEMA.COLUMNS WHERE TYPE_NAME = 'GEOMETRY') 

where findmetadata return an array of values

Is there a way to cache the result of the findmetadata function and avoid multiple calls in the main select query ?


Regards

Noel Grandin

unread,
May 6, 2020, 12:40:15 PM5/6/20
to H2 Database
if you make the ALIAS DETERMINISTIC it should cache results to some extent

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/3731e4b1-77d5-4807-9064-7729de977f14%40googlegroups.com.

Carlos Eduardo Lopez Olvera

unread,
May 7, 2020, 12:09:20 AM5/7/20
to H2 Database
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-da...@googlegroups.com.

bocher

unread,
May 8, 2020, 1:17:43 PM5/8/20
to H2 Database
Thanks Noel.
Regards

Le mercredi 6 mai 2020 18:40:15 UTC+2, Noel Grandin a écrit :
if you make the ALIAS DETERMINISTIC it should cache results to some extent

On Wed, 6 May 2020 at 10:58, bocher <erwan...@gmail.com> wrote:
Dear all,

I have the following sql query

CREATE VIEW geomColumns as select t[0] as geometry_type, t[1] srid FROM (SELECT findmetadata(COLUMN_TYPE) AS t from FROM INFORMATION_SCHEMA.COLUMNS WHERE TYPE_NAME = 'GEOMETRY') 

where findmetadata return an array of values

Is there a way to cache the result of the findmetadata function and avoid multiple calls in the main select query ?


Regards

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-da...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages