Re: Gsoc2012 idea, tablesample
От | Sandro Santilli |
---|---|
Тема | Re: Gsoc2012 idea, tablesample |
Дата | |
Msg-id | 20120419075626.GC21317@gnash обсуждение исходный текст |
Ответ на | Re: Gsoc2012 idea, tablesample (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Gsoc2012 idea, tablesample
|
Список | pgsql-hackers |
On Tue, Apr 17, 2012 at 04:29:52PM -0400, Stephen Frost wrote: > Josh, > > * Josh Berkus (josh@agliodbs.com) wrote: > > FWIW, the PostGIS folks would *really* love to have a TABLESAMPLE which > > worked with geographic indexes. This would be tremendously useful for > > constructing low-resolution "zoom out" tiles on maps and similar. > > I'm familiar with the concept of 'zoom out' tiles and PostGIS, but I > don't actually see the connection between that and TABLESAMPLE. Perhaps > I'm missing something, but I've never seen a case where you create 'zoom > out' tiles by just grabbing some portion of the data at random, as that > would end up creating empty spots or missing pieces. Actually a random sample would really be representative of the data distribution. What the type analyzer gets is a sample and that sample is what the estimator looks at to answer the question: How many rows fall in this rectangle ? You can see how well it works by passing your queries using && operator to "EXPLAIN ANALYZE" and compare estimated/real. I'm looking for a way to fetch random samples these days so I confirm the need for a quick way to fetch the same sample that "analyze" command fetches but at SQL level. --strk; ,------o-. | __/ | Delivering high quality PostGIS 2.0 ! | / 2.0 | http://strk.keybit.net - http://vizzuality.com`-o------'
В списке pgsql-hackers по дате отправления: