Query insight doesn't work

934 views
Skip to first unread message

Peter Kowenzowski

unread,
Jan 28, 2021, 12:38:08 PM1/28/21
to Google Cloud SQL discuss
There is new feature called query insights. However, doesn't work for us:

Screenshot 2021-01-28 at 17.55.38.png

Peter Kok

unread,
Jan 28, 2021, 1:37:04 PM1/28/21
to google-cloud...@googlegroups.com
It works for me. I assume it's using pg_stat_statements. Do you have that extension enabled?

CREATE EXTENSION pg_stat_statements

On Thu, Jan 28, 2021, 12:38 PM Peter Kowenzowski <pe...@airspace-intelligence.com> wrote:
There is new feature called query insights. However, doesn't work for us:

Screenshot 2021-01-28 at 17.55.38.png

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/778f2229-98d4-48a7-9645-85f5307d3f18n%40googlegroups.com.

Elliott (Google Cloud Platform Support)

unread,
Jan 28, 2021, 1:50:05 PM1/28/21
to Google Cloud SQL discuss
Hello,

I understand that Cloud SQL query insights is not working for you. From the data provided, I am not able to identify the root cause but I was able to find a Google Codelab updated yesterday that walks you through setting it up.
I hope that this is a simple issue where a step was missing and in this case, I would encourage you to take a look at this link and let us know if somehow a step was indeed missed. 

This is just a hypothesis at this point and I encourage you to reply if the lab works for you.

Jan Kleinert

unread,
Jan 28, 2021, 6:44:26 PM1/28/21
to Google Cloud SQL discuss
If you just enabled it, it may take a few minutes before you start to see the data coming through. Is it working for you now?

Peter Kowenzowski

unread,
Feb 8, 2021, 8:45:54 AM2/8/21
to Google Cloud SQL discuss
I''m trying to turn on this feature for 9.6 postgres which already exists for 2 years.

1. I waited for a few hours, but nothing pop up.
2. I enabled pg_stat_statements, but didn't help.
3. Regarding colab: it doesn't seem that I must do some additional steps except enabling query insights in GUI.
4. I try to enable google_insights extension manually, but I get an error:

Detail: Supported extensions are "bloom:1.0, btree_gin:1.0, btree_gist:1.2, chkpass:1.0, citext:1.3, cube:1.2, dblink:1.2, dict_int:1.0, dict_xsyn:1.0, earthdistance:1.1, fuzzystrmatch:1.1, hstore:1.4, intagg:1.1, intarray:1.2, ip4r:2.4, isn:1.1, lo:1.1, ltree:1.1, pg_buffercache:1.2, pg_prewarm:1.1, pg_stat_statements:1.4, pg_trgm:1.3, pgaudit:1.1.2, pgcrypto:1.3, pgrowlocks:1.2, pgstattuple:1.4, plpgsql:1.0, postgis:2.3.0, postgis_tiger_geocoder:2.3.0, postgis_topology:2.3.0, prefix:1.2.0, sslinfo:1.2, tablefunc:1.0, tsm_system_rows:1.0, tsm_system_time:1.0, unaccent:1.1, uuid-ossp:1.1, postgres_fdw:1.0, pg_freespacemap:1.2, pg_visibility:1.2, pageinspect:1.5, pgfincore:1.2, pg_repack:1.4.4, hll:2.12, plproxy:2.9.0".

5. I think query insights are somehow corrupted for our database. CloudSQL log with "insights" query:

Screenshot 2021-02-08 at 14.42.42.png

6. I will try to enable query insights on a new CloudSQL instance.

Peter Kowenzowski

unread,
Feb 8, 2021, 9:59:40 AM2/8/21
to Google Cloud SQL discuss
6.  On a new CloudSQL instance everything works.

Screenshot 2021-02-08 at 15.53.55 1.png

In the logs there queries for query insights:

Screenshot 2021-02-08 at 15.58.58.png
 
We really need this feature. Can anyone help? :)

João Vieira

unread,
Feb 8, 2021, 2:12:08 PM2/8/21
to Google Cloud SQL discuss
Hello, I am having the same problem.

I have a master and two read replicas.

It works in the master but not in the replicas.

Screen Shot 2021-02-06 at 16.36.07.png

David (Cloud Platform Support)

unread,
Feb 9, 2021, 4:01:08 PM2/9/21
to Google Cloud SQL discuss

Currently, there’s an issue with query insights and we recommend to disable it for now. A fix has been developed and will be released within the next few weeks. You can follow this Issue tracker to find out when the fix is released.

João Vieira

unread,
Feb 9, 2021, 4:36:42 PM2/9/21
to Google Cloud SQL discuss
Where can we disable it?


Screen Shot 2021-02-09 at 21.35.16.png

João Vieira

unread,
Feb 9, 2021, 4:39:13 PM2/9/21
to Google Cloud SQL discuss
Answering my question for anyone else in need:
1. Go to Overview
2. Click Edit
3. In Configuration Options, click Query Insights
4. Uncheck "Enable Query Insights"
5. Click Save

wushawn

unread,
Feb 10, 2021, 4:54:30 PM2/10/21
to Google Cloud SQL discuss
glad you resolved yourself
Reply all
Reply to author
Forward
0 new messages