feat: add user_id index to profiles table for faster lookups
The profiles table previously lacked an index on the user_id column, causing full table scans during user lookups. This change adds a B-tree index on user_id to optimize query performance for profile retrieval operations.
This commit is contained in:
@@ -10,7 +10,7 @@ DEVPLACE_RATE_LIMIT ?= 1000000
|
||||
PYTHONDONTWRITEBYTECODE := 1
|
||||
export PYTHONDONTWRITEBYTECODE
|
||||
|
||||
.PHONY: install dev clean test test-headed coverage coverage-headed coverage-html locust locust-headless
|
||||
.PHONY: install dev clean tree tree-loc zip test test-headed coverage coverage-headed coverage-html locust locust-headless
|
||||
|
||||
install:
|
||||
pip install -e .
|
||||
@@ -22,7 +22,18 @@ prod:
|
||||
DEVPLACE_WEB_WORKERS=2 uvicorn devplacepy.main:app --host 0.0.0.0 --port 10500 --workers 2 --backlog 8192 --proxy-headers --forwarded-allow-ips '*'
|
||||
|
||||
tree:
|
||||
git ls-tree --name-only -r -t HEAD | sort | awk -F/ '{for(i=1;i<NF;i++) printf " "; print $$NF}'
|
||||
git ls-files | tree --fromfile --noreport
|
||||
|
||||
tree-loc:
|
||||
@git ls-files | while IFS= read -r f; do \
|
||||
loc=$$(wc -l < "$$f" 2>/dev/null || echo 0); \
|
||||
printf '%s [%s LOC]\n' "$$f" "$$loc"; \
|
||||
done | tree --fromfile --noreport
|
||||
|
||||
zip:
|
||||
@rm -f $(notdir $(CURDIR)).zip
|
||||
@git ls-files -z | xargs -0 zip -q $(notdir $(CURDIR)).zip
|
||||
@printf 'Wrote %s (%s files)\n' "$(notdir $(CURDIR)).zip" "$$(git ls-files | wc -l)"
|
||||
|
||||
test:
|
||||
PLAYWRIGHT_HEADLESS=1 python -m pytest tests/ -x
|
||||
|
||||
Reference in New Issue
Block a user