Skip to main content

labeling queries with "union"

  • February 24, 2014
  • 1 reply
  • 9 views

dafna
Forum|alt.badge.img
  • Participating Frequently
Hi,

We are using query labels to monitor our queries permanence.
(https://my.vertica.com/docs/6.1.x/HTML/index.htm#18282.htm)

For some reason, we can't see the queries which have "union" on the query_profiles table.

to test this -


1) execute this query
select /*+label(test34)*/ 1


2) execute
select * from query_profiles where identifier='test34'

-->
I get a result


3) execute
select /*+label(test56)*/ 1
union
select 2

4) execute
select * from query_profiles where identifier='test56'
-->
no results

Do you know why this happens and how can we fix it?

Thanks,
Dafna.


1 reply

Po_Hong_1
  • New Participant
  • February 26, 2014


Looks like a bug to me.  One quick workaround is to do the following:

select /*+label(test56)*/ *
From ( select 1
union
select 2 ) A
;