B-tree is a self-balancing tree that maintains sorted data and allows operation in logarithmic time. B-trees can handle range queries on sorted data (<, ≤, >, ≥, between, in, is null, is not null) B-tree index can also be used for queries that involve pattern matching operator LIKE or ~ if the pattern is a constant and the anchor is at the beginning of the pattern. For example, you can try matching queries column_name LIKE ‘Apple%’ or column_name ~ ‘^Apple’ But, querying ‘%macbook%’ or ‘%pro’ will not be efficient. For such queries, the query planner will resort to full-text sequential search which is not optimized. Enter, GIN indexes. GIN stands for Generalized Inverted Indexes. We can create a GIN index to speed up text searches: CREATE INDEX index_name ON table USING GIN (to_tsvector(‘english’, column_name)); The query above specifies that the English configuration can be used to parse and normalize the strings. And for the part of searching, a simple query to print the tit...
devtools console helps: Access to XMLHttpRequest at 'http://localhost:8443/api/essay/6' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Access to fetch at 'http://localhost:8443/graphql' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. login:109 Access to fetch at 'http://localhost:8443/graphql' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on th...
start downloaded container: docker start hash or name from docker ps -a docker build ./ -t findli/ubuntu_base:18_03_2023 ************ docker-compose: build: context: ./frontend - контекст это директория в которой будет искаться dockerfile dockerfile: Dockerfile равнозначно: build: #context: ./frontend dockerfile: frontend/Dockerfile ************ ************ ********** error: when docker-compose up --force-recreate --build --remove-orphans langapp-back strconv.Atoi: parsing "": invalid syntax to fix: comment existing containers in docker-compose.yaml file. replace them by something else. then docker compose up --remove-orphans then revert suspicious containers in docker-conpose file then docker compose up will work. src: https://github.com/docker/compose-cli/issues/1537#issuecomment-1284828193 ********** ********** https://stackoverflow.com/a/52...
Комментарии
Отправить комментарий