Skip to main content
Glama

Personupplysning MCP Server

verify-new-indexes.tsβ€’2.38 kB
#!/usr/bin/env tsx import 'dotenv/config'; import { createClient } from '@supabase/supabase-js'; const supabase = createClient( process.env.SUPABASE_URL!, process.env.SUPABASE_SERVICE_ROLE_KEY! ); async function verifyNewIndexes() { console.log('πŸ” Verifying new optimization indexes...\n'); const expectedIndexes = [ 'idx_companies_form_active', 'idx_companies_reg_date_active', 'idx_companies_form_namn', 'idx_companies_postadress_prefix', 'idx_companies_fts_namn', 'idx_companies_fts_beskrivning', 'idx_companies_fts_active', 'idx_companies_created_brin', 'idx_financial_org_year', 'idx_financial_with_metrics' ]; const { data: allStats, error } = await supabase.rpc('get_index_stats'); if (error) { console.error('❌ Error calling get_index_stats:', error.message); return; } console.log('πŸ“Š Checking for optimization indexes:\n'); let foundCount = 0; for (const idxName of expectedIndexes) { const found = allStats?.find((s: any) => s.indexname === idxName); if (found) { console.log(` βœ… ${idxName} (${found.size_mb})`); foundCount++; } else { console.log(` ❌ ${idxName} - NOT FOUND`); } } console.log(''); console.log(`Found ${foundCount}/${expectedIndexes.length} optimization indexes`); // Check materialized view console.log('\nπŸ” Checking materialized view...\n'); const { count, error: viewError } = await supabase .from('company_financial_summary') .select('*', { count: 'exact', head: true }); if (viewError) { console.log(' ❌ company_financial_summary - NOT FOUND'); } else { console.log(` βœ… company_financial_summary (${count?.toLocaleString() || 0} rows)`); } console.log('\n════════════════════════════════════════════════════════════'); if (foundCount === expectedIndexes.length && !viewError) { console.log('βœ… All optimizations successfully applied!'); } else { console.log('⚠️ Some optimizations are missing'); } console.log('════════════════════════════════════════════════════════════'); } verifyNewIndexes();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/isakskogstad/personupplysning-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server