Opened 10 years ago

Closed 5 years ago

#5536 closed enhancement (wontfix)

postgisraster driver still making a full table scan for metadata fetching

Reported by: strk Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc: jorgearevalo@…

Description

While r26149 supposedly removed the need for full table scans I still see a full table scan being performed for metadata:

duration: 1135.016 ms  statement: 
select cartodb_id, st_metadata(rastnodata) from public.hyp_lr

I suspect such full scan is not really needed because the next query extracts _band_ metadata only for the first row instead:

duration: 3.032 ms  statement: 
select st_bandmetadata(rastnodata, band) from (select rastnodata, generate_series(1, st_numbands(rastnodata)) band from (select rastnodata from public.hyp_lr limit 1) bar) foo

Should also the first query be limited ?

Change History (1)

comment:1 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.