Vectorstore with pgvector on Cloud SQL
Cloud SQL is a fully managed relational database offered by Google Cloud. It can run PostgreSQL, MySQL, and SQL Server [3].
Cloud SQL, when running with PostgreSQL and the pgvector extension, can function as both a VectorStore and a Document Store, combining both functionalities in a single service. It also offers the possibility of filtering queries using full SQL syntax, rather than just filtering by metadata.
The first step in using this service is to create a Cloud SQL instance and a database within it.
Creating a CloudSQL instance and database
You have several options for creating these: the Google Cloud console, the gcloud
command-line tool, or various SDKs for different programming languages. For detailed instructions on each method, please refer to the official documentation [4].
We will use the gcloud
command-line tool to create a new Cloud SQL instance:
gcloud sql instances create MY_SQL_INSTANCE_NAME \ --region=MY_REGION...