On Sat, Mar 17, 2012 at 8:48 PM, HuangQi <huangq...@gmail.com> wrote: > About the second topic, so currently TABLESAMPLE is not implemented > inside Postgres? I didn't see this query before, but I googled it just now > and the query seems very weird and > interesting. http://www.fotia.co.uk/fotia/DY.18.TheTableSampleClause.aspx > Still, do you have any mail thread talking about this?
I think there may be a few, but there's a nice implementation plan discussed by Neil Conway and written into slides from a few years ago: http://www.pgcon.org/2007/schedule/attachments/9-Introduction_to_Hacking_PostgreSQL_Neil_Conway.pdf He also had his implementation, although at this point some of the bitrot will be intense: http://www.neilconway.org/talks/hacking/ I also seem to remember writing this (to some degree) as a student as part of a class project, so a full-blown production implementation in a summer sounds reasonable, unless someone has thought more about this and ran into some icebergs. I'm not sure exactly what the blockers were to this being committed back in 2007 (not to suggest there weren't any). I haven't thought enough about skipscan, but there a number more unknowns there to me... -- fdr -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers