<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
	  <title>Ask MetaFilter questions tagged with postgres</title>
      <link>http://ask.metafilter.com/tags/postgres</link>
      <description>Questions tagged with 'postgres' at Ask MetaFilter.</description>
	  <pubDate>Wed, 04 Feb 2009 18:18:38 -0800</pubDate> <lastBuildDate>Wed, 04 Feb 2009 18:18:38 -0800</lastBuildDate>

      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>	  
	<item>
	<title>How does flickr do it?</title>
	<link>http://ask.metafilter.com/113401/How%2Ddoes%2Dflickr%2Ddo%2Dit</link>	
	<description>My developer and I want to create a database schema that allows us to search through hundreds of tags applied to thousands of records. So far our benchmarks suck. Are we expecting too much? Here&apos;s the deal (and I&apos;m not the database guy, so bear with me if I mess up the nomenclature): We have a bunch of records and want to apply tags to them. We&apos;re testing a database schema with dummy data including 100,000 records and 750 tags, with an average tag-to-record count of 100. This doesn&apos;t perfectly approximate our actual data set, but it&apos;s close enough.&lt;br&gt;
&lt;br&gt;
So we have Table 1, which lists the tag ids, Table 2, which lists the record ids, and a join table, which is a two-column table listing a tag id in one column and a record id in the other wherever that tag is associated with that record.&lt;br&gt;
&lt;br&gt;
For example, if tag223 is associated with record12, record6994, and record90001, the join table looks like this:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;tag223 | record12&lt;br&gt;
tag223 | record6994&lt;br&gt;
tag223 | record90001&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
(Given the numbers above, the actual join table has around 10,000,000 rows.)&lt;br&gt;
&lt;br&gt;
This seemed to make sense when he explained it to me, but the benchmarks with the dummy data, even indexed, were ridiculously slow. This was just one a desktop machine, but it was several orders of magnitude slower than we want it to be.&lt;br&gt;
&lt;br&gt;
Is it possible to do tag-based searching on this scale with decent performance? Are we missing something simple?&lt;br&gt;
&lt;br&gt;
We&apos;re using Postgres. The final product is going to be extremely read-heavy (i.e., once the data&apos;s in it&apos;ll be only minor updates). If I&apos;ve left anything out, please ask.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.113401</guid>
	<pubDate>Wed, 04 Feb 2009 18:18:38 -0800</pubDate>
	<category>database</category>
	<category>postgres</category>
	<category>schemata</category>
	<category>sql</category>
	<category>tags</category>
	<dc:creator>hayvac</dc:creator>
	</item>
	<item>
	<title>Did the earth move for you too?</title>
	<link>http://ask.metafilter.com/111309/Did%2Dthe%2Dearth%2Dmove%2Dfor%2Dyou%2Dtoo</link>	
	<description>GISfilter -- I have a PostGIS table containing spatial data in the form of a few thousand shapefiles.  Anybody know a quick way I can move *all* of them by about 40 metres? Due to a bizarre set of circumstances I need to work with a data set of things contructed from GPS in Ireland.  Because of a systemic error, every multipolygon I have is out of whack slightly.  Boo!&lt;br&gt;
&lt;br&gt;
Yet, because the country I live in is small enough for this to work, I can have a bunch of stuff accurate to within 2m if I globally move every multipolygon 50m to the North and 23.4m to the West.  Yay!&lt;br&gt;
&lt;br&gt;
But I&apos;m too unfamiliar with both Postgres and Python (I&apos;m working with Geodjango for the first time) to figure out which 10-line loop script will do that lateral translation for me.  Boo!&lt;br&gt;
&lt;br&gt;
So... um...  can anybody lend me a hand here?  I don&apos;t really care which language the one-use-ever script I need is written in.  And my multipolygons are strings of co-ords using WGS84, where each X&amp;amp;Y value is separated by a space, and each pair separated by a comma.&lt;br&gt;
&lt;br&gt;
The application of your collective genius is warmly appreciated.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.111309</guid>
	<pubDate>Sat, 10 Jan 2009 12:24:08 -0800</pubDate>
	<category>gis</category>
	<category>math</category>
	<category>maths</category>
	<category>postgis</category>
	<category>postgres</category>
	<category>resolved</category>
	<category>translation</category>
	<dc:creator>genghis</dc:creator>
	</item>
	<item>
	<title>MySQL vs PostgreSQL?</title>
	<link>http://ask.metafilter.com/92162/MySQL%2Dvs%2DPostgreSQL</link>	
	<description>What&apos;s the hive mind&apos;s opinion on MySQL vs PostgreSQL? In a web dev shop, rebuilding the platform. It seems like at MySQL 5.2, the differences have become rather negligible, but I am still interested in your experiences. Currently we&apos;re using MySQL (5.0 though), but I&apos;ve always heard wonderful things about Postgres&apos;s robustness and speed.&lt;br&gt;
&lt;br&gt;
Everything I find on google for &apos;mysql vs postgresql&apos; seems to date bate to 2003.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2008:site.92162</guid>
	<pubDate>Thu, 22 May 2008 16:32:05 -0800</pubDate>
	<category>mysql</category>
	<category>postgres</category>
	<category>postgresql</category>
	<dc:creator>xmutex</dc:creator>
	</item>
	<item>
	<title>Converting Postrges-specific query to Mysql</title>
	<link>http://ask.metafilter.com/42160/Converting%2DPostrgesspecific%2Dquery%2Dto%2DMysql</link>	
	<description>I need help converting a Postgres-specific SQL query to MySQL I&apos;m in the middle of converting an application to use a Mysql back-end instead of Postgres. The database schema I got converted fairly easily, but one of the SQL queries that the app executes is failing, and I don&apos;t know how to write it to make MySQL happy. I&apos;m assuming that the EXTRACT(epoch from task_id::abstime) is where it&apos;s failing. &lt;br&gt;
&lt;br&gt;
Anyone with good Mysql-fu that can help?&lt;br&gt;
&lt;br&gt;
SELECT EXTRACT (epoch from task_id::abstime),&lt;br&gt;
                                task_name&lt;br&gt;
                                FROM tasks WHERE task_id &amp;lt; now()&lt;br&gt;
                                AND task_state = &apos;%d&apos;;</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2006:site.42160</guid>
	<pubDate>Fri, 14 Jul 2006 09:19:40 -0800</pubDate>
	<category>conversion</category>
	<category>database</category>
	<category>mysql</category>
	<category>postgres</category>
	<category>query</category>
	<category>sql</category>
	<dc:creator>mcstayinskool</dc:creator>
	</item>
	
	</channel>
</rss>

