Questions tagged [google-cloud-sql]

Google Cloud SQL is a service that allows you to create, configure, and use relational databases (currently MySQL and PostgreSQL) that live in Google's cloud. It is a fully-managed service that maintains, manages, and administers your databases, allowing you to focus on your applications and services.

Filter by
Sorted by
Tagged with
3
votes
1answer
668 views

Galera cluster into Google cloud platform

We have a galera cluster with 3 nodes, on 3 different physical machines but all located in the same datacenter. From what I understood, the reason they deployed this in the past was to increase ...
3
votes
1answer
890 views

MySQL slow_log table: querying takes forever

I'm running a query on the slow_log: SELECT start_time FROM mysql.slow_log WHERE start_time < TIMESTAMP '2016-01-31 00:00:00' Without a WHERE clause (using a LIMIT), the selects are fast. ...
2
votes
1answer
86 views

Durability of storage in second generation google cloud sql

How durable should I expect data for a Google Cloud SQL instance to be? Just a single instance, with the high-availability option disabled. AWS explicitly mention that Amazon Aurora data is stored in ...
2
votes
1answer
1k views

ERROR 2003 (HY000): Can't connect to MySQL server on 'xxx.xxx.xx.xx' (10060)

I'm trying to connect my local MySQL workbench to a 2nd generation MySQL instance on Google SQL platform using the following command on my windows laptop. mysql --host=130.xxx.xx.xx --port=3306 --...
2
votes
0answers
115 views

Does Google CloudSQL Export function lock tables?

In order to create more 'data recovery' points than the standard automatic backup policy allows, I'm going to run a cron which will export sql dumps out of my CloudSQL instances at intervals ...
2
votes
0answers
54 views

taking a gcloud snapshot of a postgres database

Given a postgres database on a Google cloud virtual machine instance, are we guaranteed snapshot consistency if we call pg_start_backup(), sync(), then take a snapshot of the instance? https://cloud....
1
vote
1answer
1k views

UNION Queries run in Parallel form or not

I have three tables and I want to select data from these three tables in parallel form to increase the performance. I'm running a query like this. SELECT * FROM table1 UNION ALL SELECT * FROM table2 ...
1
vote
2answers
58 views

How do you know when it's time to upgrade a RDBMS/SQL database infrastructure? What metrics to follow? [closed]

In my specific case, I have just deployed my side project to AWS and using AWS MySQL Tier 2 Micro instance, which is within AWS' Free Tier; https://aws.amazon.com/ec2/instance-types/t2/ It has: 20 ...
1
vote
1answer
26 views

migrate users from mariadb10.1 to mysql5.7

My company is moving our databases from self-hosted mariadb 10.1 to Google CloudSQL (which is essentially MySQL 5.7). Dumping / restoring our application schemas looks straightforward. However I'm ...
1
vote
1answer
47 views

Speed up 180M+ rows returned by simple SELECT with PostgreSQL

I have performance issues on a SELECT statement which returns 180+ out of 220+ of millions of rows on my managed PostgreSQL. The table structure is the following: CREATE TABLE members ( id ...
1
vote
1answer
939 views

GCP MySQL query logging

I have a managed MySQL instance on GCP. Where would I find a query log? Is this something I need to enable first somewhere? I have read their documentation ( https://cloud.google.com/sql/docs/mysql/...
1
vote
2answers
39 views

Improve speed of GCP SQL Failover

I've been trying out GCPs SQL high availability options. Is there a way to improve the fail over speed? Attempting manual failovers through the UI takes literally over 5 minutes where mysql is ...
1
vote
1answer
70 views

Google Cloud SQL lacks raster2pgsql

Google Cloud SQL supports the PostGIS extension, but I haven't seen any documentation regarding how to work with raster data on it. To load raster data into a table, we have to use raster2pgsql driver....
1
vote
1answer
266 views

Set column to randomly chosen value from another table

Consider this: UPDATE dest SET dest_col = (SELECT s.src_col FROM source s WHERE s.name = 'abc' ORDER BY random() LIMIT 1 OFFSET 0); My goal: Set dest.dest_col in ...
1
vote
3answers
1k views

Google Cloud SQL Replication Delay

We have a project which does write data on a second generation MySQL 5.6 The master's write behaviour: Average 70 write operations per second. The thing is 2 times a day, application writes data ...
1
vote
1answer
488 views

How to setup vault and Postgres in Google cloud to have the correct permissions?

The Problem I am trying to setup Hashicorp vault and Postgres in Google Cloud. I am using liquibase to manage the schema and when that does a migration, it retrieves a username/password from vault ...
1
vote
1answer
39 views

Information_schema appearing in slow_log

I am finding that my information_schema keeps running this query SELECT engine, COUNT(*) as n FROM information_schema.tables WHERE engine is not null GROUP BY engine Which seems to always appear in ...
1
vote
1answer
281 views

How to sync easily between a master database from Google Cloud SQL and a master database from Amazon RDS

I've created a master - slave (replication) in Google Cloud SQL. I've also created a master - slave (replication) in Amazon RDS. I want to sync two master MysQL from Google Cloud SQL and Amazon RDS....
1
vote
0answers
44 views

Dumping Postgres schema from Google cloud SQL

Now this may look trivial but it is a managed service so I don't have the superuser rights. And various schema/tables/sequences have different roles/users as their owners so I can't just use pg_dump ...
1
vote
0answers
38 views

Why use Failover replica on Google Cloud RDS?

we are thinking of migrating our MySQL database from our dedicated server to a Google Cloud RDS instance. However I would like to clarify the below: 1) What is the purpose of creating a failover ...
1
vote
1answer
325 views

What database to choose for 1TB of time series? [closed]

I'm saving about 3GB per day of financial orderbook data to a database (currently Mysql). In the coming weeks, I'm going to save trade and quote (bids/asks) data too. Data is structured, but I'm ...
1
vote
1answer
26 views

Adding columns upped my RAM usage significantly

I have a Google Cloud Platform MySQL 2nd Gen 5.7 instance with two databases, one for testing and one for production. There are about 20 or so tables. One of the tables accounts for 99% of the ...
1
vote
0answers
45 views

X-devAPI not working inside of Google cloud SQL

I am tryng to use X-devAPI inside of Google cloud SQL but getting the following error from MySQL client comp@user:~$ sudo mysqlsh -u root -h XX.XXX.XX.XXX --mysql --dba enableXProtocol [sudo] ...
1
vote
1answer
50 views

Is it a bad practice to associate database records to relevant object storage by ID?

I'm using Google Cloud Platform to host a web app. The app has a typical database structure, with a schema defined by Django migrations. For one of the models, Song, each record should be associated ...
1
vote
0answers
92 views

GoogleSQL query first range of records and perform average

Using GoogleSQL I want to extract just the first 24 records of each record_id, based on time period. After that perform an average over that range (1-24), and also calculate the growth rate period ...
0
votes
2answers
44 views

Efficient key value store in Postgres

I want to use Postgres(11 in CloudSQL) as an efficient key value store. I have about 200GB of dictionaries (average size is 10kB, the structure can be different and nested). I'm thinking about ...
0
votes
1answer
42 views

Removing MySQL Orphan Tables in Google's Managed MySQL

I have a number of orphan tables that I am unable to remove in Google managed MySQL instance. https://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html describes how to find them ...
0
votes
2answers
104 views

Why is an instance forced to reboot?

This is My SQL Project instance log. I set the instance not to shut down automatically. But why does the instance automatically shut down irregularly? 2019-03-28 08:58:13.100 JST 2019-03-27 23:58:13 ...
0
votes
1answer
117 views

How to configure PG text search dictionary through sql

I want to add terms to a text search dictionary without access to the file system shares/tsearch_data (specifically for google cloud SQL). Is there a syntax to do this via SQL? All I have found is "...
0
votes
1answer
439 views

MySQL compression on Google Cloud SQL

As the Google Cloud SQL is a managed instance of MySQL under the hood, limited to an absolute max on 2nd generation machines of 100GB of RAM, should I be compressing some of my table and index data ? ...
0
votes
0answers
5 views

How to create multiple pool connection using Psycopg2 in Cloud Functions (GCP)

I am creating Cloud Functions for some queries to read and write in different databases. In GCP concept, I am connected to Cloud SQL - Postgres and using Psycopg2, tested locally - python postgres ...
0
votes
0answers
75 views

PgAdmin 4.14 connection error in cloudSQL : could not send data to server, socket is not connected, could not send ssl negotiation packet

I am trying to connect cloud sql with pgadmin but it throws error when I try to execute query. "Could not send Data to server, socket is not connected, could not sent SSL negotiation pocket" ...
0
votes
0answers
21 views

ALTER TABLE causing transaction aborted

There are two transactions. One transaction I used BEGIN RO for read-only transaction. While the other one I used BEGIN to allow me adding a new column to my table called dummy_table. This is what I'...
0
votes
1answer
48 views

App Engine Standard connection to Cloud SQL Latency Randomly

I have a pretty "basic" app that we designed that was originally on a local plesk server and we migrated to GAE/GSQL/GCS. app engine, mysql, cloud storage. Here's some background info: App is PHP ...
0
votes
0answers
121 views

Binary log CLOUD SQL

Good day , my colleague was trying to get a backup from cloud sql using binary log, is there a chance to get the binary log with a specific date and time?
0
votes
0answers
34 views

Configuring CloudSQL (MySQL) with binary logs but without backups

In the Google CloudSQL (MySQL) console, I can read: Automated backups required for binary logging. This requirement looks strange to me. I do not understand why automated backups are required for ...
0
votes
1answer
47 views

Drastic performance difference between identical queries involving join on different tables

I have a Google cloud SQL instance with 1 CPU and 3.75GB RAM running MySQL 5.7. The following two queries, both of which involve a common table, have drastic performance differences and I cannot ...
0
votes
1answer
291 views

MySQL column that auto generates data, longer than UUID

My friend has the problem as shown below. He asked at StackOverFlow and there is no reply yet till now so I wish to help him to try the luck here. Thanks for everyone that helps. "I would like to ask ...
0
votes
1answer
47 views

Migration MySQL to Cloud Environment replication

I'm having 5 MySQL database server , these 5 server are used for e-business web-server. Now I Would like to move the MySQL database to cloud environment for database continuous running. Recently we ...