('avgResponseTime').textContent = 
                Math.round(totalResponseTime / totalSearches) + 'ms';
            document.getElementById('cacheHitRate').textContent = 
                Math.round((cacheHits / totalSearches) * 100) + '%';
        }

        async function loadStats() {
            try {
                const response = await fetch('/api/stats');
                const data = await response.json();

                let totalRecords = 0;
                if (data.tables && data.tables.length 