[geeks] MySQL question

Patrick Giagnocavo +1.717.201.3366 patrick at zill.net
Mon May 24 23:37:04 CDT 2004


On Tue, May 25, 2004 at 12:37:56AM -0400, Phil Stracchino wrote:
> On Mon, May 24, 2004 at 11:50:45PM -0400, Patrick Giagnocavo +1.717.201.3366 wrote:
> > On Mon, May 24, 2004 at 11:16:11PM -0400, Phil Stracchino wrote:
> > > On Mon, May 24, 2004 at 10:29:46PM -0400, Patrick Giagnocavo +1.717.201.3366 wrote:
> > Would love to hear more about this and see some sample code.  Maybe I
> > could run it past some PG gurus I know and they could suggest
> > something.
> 
> If you dig through the archives of bacula-devel on lists.sourceforge.net
> from about, oh, three or four weeks ago, maybe six, you should be able
> to find the discussion.  I seem to remember it had something to do with
> an index on a foreign key, but I'll admit I wasn't paying too close
> attention to that thread.  Operations like building lists were taking
> minutes on MySQL and 11 hours on pgSQL.

I think I found it.  MySQL does not have true foreign key constraints.
PG does.  Thus, if you enable PG's FK constraints it slows down the PG
side. The bacula datamodel for other databases does not use foreign
keys.

this:

http://sourceforge.net/mailarchive/forum.php?thread_id=4685884&forum_id=8650

and this:

http://sourceforge.net/mailarchive/forum.php?thread_id=4685889&forum_id=8650

Appear to be the threads that cover it.

> Uh, I think it did have to do with building trees ....  I'll check.  If
> you have got a big code speedup, I'm sure Kern would be glad to have it.

Hm well I haven't looked over the datamodel yet.  If you have a link
to just that file it wold make things easier to look over.

--Patrick



More information about the geeks mailing list