mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 20:11:12 -05:00
Optimize select queries
This commit is contained in:
@@ -61,7 +61,7 @@ export function LocationSearch({ onLocationSelect, initialLocationId, className
|
||||
const loadInitialLocation = async (locationId: string) => {
|
||||
const { data, error } = await supabase
|
||||
.from('locations')
|
||||
.select('*')
|
||||
.select('id, name, city, state_province, country, postal_code, latitude, longitude, timezone')
|
||||
.eq('id', locationId)
|
||||
.maybeSingle();
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export function SearchResults({ query, onClose }: SearchResultsProps) {
|
||||
// Search companies
|
||||
const { data: companies } = await supabase
|
||||
.from('companies')
|
||||
.select('*')
|
||||
.select('id, name, slug, description, company_type, logo_url, average_rating, review_count')
|
||||
.or(`name.ilike.${searchTerm},description.ilike.${searchTerm}`)
|
||||
.limit(3);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user