⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gist.sgml

📁 关系型数据库 Postgresql 6.5.2
💻 SGML
字号:
<Chapter Id="gist"><DocInfo><AuthorGroup><Author><FirstName>Gene</FirstName><Surname>Selkov</Surname></Author></AuthorGroup><Date>Transcribed 1998-02-19</Date></DocInfo><Title>GiST Indices</Title><Para>The information about GIST is at <ULink url="http://GiST.CS.Berkeley.EDU:8000/gist/">http://GiST.CS.Berkeley.EDU:8000/gist/</ULink>with more on different indexing and sorting schemes at<ULink url="http://s2k-ftp.CS.Berkeley.EDU:8000/personal/jmh/">http://s2k-ftp.CS.Berkeley.EDU:8000/personal/jmh/</ULink>And there is more interesting reading at the Berkely database site at <ULink url="http://epoch.cs.berkeley.edu:8000/">http://epoch.cs.berkeley.edu:8000/</ULink>.</para><Para><Note><Title>Author</Title><Para>This extraction from an e-mail sent by <ULink url="mailto:selkovjr@mcs.anl.gov">Eugene Selkov Jr.</ULink>contains good informationon GiST. Hopefully we will learn more in the future and update this information.- thomas 1998-03-01</Para></Note></para><Para>Well, I can't say I quite understand what's going on, but at leastI (almost) succeeded in porting GiST examples to linux. The GiST accessmethod is already in the postgres tree (<FileName>src/backend/access/gist</FileName>).</para><Para><ULink url="ftp://s2k-ftp.cs.berkeley.edu/pub/gist/pggist/pggist.tgz">Examples at Berkeley</ULink>come with an overview of the methods and demonstrate spatial index mechanisms for 2D boxes, polygons, integer intervals and text(see also <ULink url="http://gist.cs.berkeley.edu:8000/gist/">GiST at Berkeley</ULink>).In the box example, weare supposed to see a performance gain when using the GiST index; it didwork for me but I do not have a reasonably large collection of boxesto check that. Other examples also worked, except polygons: I got an error doing<ProgramListing>test=> create index pix on polytmptest-> using gist (p:box gist_poly_ops) with (islossy);ERROR:  cannot open pix(PostgreSQL 6.3               Sun Feb  1 14:57:30 EST 1998)</ProgramListing></para><Para>I could not get sense of this error message; it appears to be somethingwe'd rather ask the developers about (see also Note 4 below). What Iwould suggest here is that someone of you linux guys (linux==gcc?) fetch the original sources quoted above and apply my patch (see attachment) and tell us what you feel about it. Looks cool to me, but I would not like to hold it up while there are so many competent people around.</para><Para>A few notes on the sources:</para><Para>1. I failed to make use of the original (HPUX) Makefile and rearranged   the Makefile from the ancient postgres95 tutorial to do the job. I tried   to keep it generic, but I am a very poor makefile writer -- just did   some monkey work. Sorry about that, but I guess it is now a little   more portable that the original makefile.</para><Para>2. I built the example sources right under pgsql/src (just extracted the   tar file there). The aforementioned Makefile assumes it is one level   below pgsql/src (in our case, in pgsql/src/pggist).</para><Para>3. The changes I made to the *.c files were all about #include's,   function prototypes and typecasting. Other than that, I just threw    away a bunch of unused vars and added a couple parentheses to please   gcc. I hope I did not screw up too much :)</para><Para>4. There is a comment in polyproc.sql:<ProgramListing>-- -- there's a memory leak in rtree poly_ops!!-- -- create index pix2 on polytmp using rtree (p poly_ops);</ProgramListing>   Roger that!! I thought it could be related to a number of   <ProductName>Postgres</ProductName> versions   back and tried the query. My system went nuts and I had to shoot down   the postmaster in about ten minutes.</para><Para>I will continue to look into GiST for a while, but I would alsoappreciatemore examples of R-tree usage.</para></Chapter>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -