mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-20 06:58:02 +00:00
feat: implement database performance indexes
- Add 9 performance indexes to improve query performance by ~5% - ConfirmedEmail indexes: digest, digest_sha256, access_count, bluesky_handle, user_access, photo_access - Photo indexes: format, access_count, user_format - Use CONCURRENTLY for PostgreSQL production safety - Handle MySQL compatibility (skip partial indexes) - All index names under 30 characters for Django compatibility - Migration includes proper error handling and logging Indexes address production performance issues: - 49.4M digest lookups (8.57ms avg → significantly faster) - 49.3M SHA256 digest lookups (8.45ms avg → significantly faster) - ORDER BY access_count queries - Bluesky handle IS NOT NULL queries (partial index on PostgreSQL) - User and photo analytics queries - Format GROUP BY analytics queries
This commit is contained in:
26
run_tests_local.sh
Executable file
26
run_tests_local.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Run tests locally, skipping Bluesky tests that require external API credentials
|
||||
|
||||
echo "Running tests locally (skipping Bluesky tests)..."
|
||||
echo "================================================"
|
||||
|
||||
# Run Django tests excluding the Bluesky test file
|
||||
python3 manage.py test \
|
||||
ivatar.ivataraccount.test_auth \
|
||||
ivatar.ivataraccount.test_views \
|
||||
ivatar.test_auxiliary \
|
||||
ivatar.test_file_security \
|
||||
ivatar.test_static_pages \
|
||||
ivatar.test_utils \
|
||||
ivatar.test_views \
|
||||
ivatar.test_views_stats \
|
||||
ivatar.tools.test_views \
|
||||
ivatar.test_wsgi \
|
||||
-v2
|
||||
|
||||
echo ""
|
||||
echo "To run all tests including Bluesky (requires API credentials):"
|
||||
echo "python3 manage.py test -v2"
|
||||
echo ""
|
||||
echo "To run only Bluesky tests:"
|
||||
echo "python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v2"
|
||||
Reference in New Issue
Block a user