| From: | Ian Barwick <barwick(at)gmx(dot)net> |
|---|---|
| To: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Postgres performance comments from a MySQL user |
| Date: | 2003-06-12 14:49:45 |
| Message-ID: | 200306121649.45859.barwick@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thursday 12 June 2003 15:50, Ron Johnson wrote:
> On Thu, 2003-06-12 at 08:05, Martin Marques wrote:
> > On Mié 11 Jun 2003 12:29, Jonathan Bartlett wrote:
> > > 3) If your point was to move to a relational database, then you should
> > > choose Postgres. MySQL, although it's SQL, hardly qualifies as
> > > relational
> >
> > MySQL doesn't have relations at all, unless you put the InnoDB module,
> > which stamps down performance.
> >
> > An example I tried to do on a MySQL without InnoDB was:
> >
> > CREATE TABLE testing (
> > id INT,
> > word VARCHAR(20) REFERENCES other_table("word")
> > );
> >
> > (knowing that other_table exists (I prefiously created it) and has word
> > as a VARCHAR(20) field).
> >
> > An error is what I got.
>
> A table *is* a relation. You seem to be referring to foreign keys.
> Maybe MySQL has a different syntax?
It accepts syntax like this:
CREATE TABLE exmpl6 (
id INT,
blah TEXT,
INDEX(id),
CONSTRAINT id_fkey FOREIGN KEY (id) REFERENCES exmpl5(id) ON DELETE
NO ACTION
);
but ignores it silently if you omit the "type=innodb" after the table
definition (at least in 3.23.x versions).
(When developing for MySQL I have a list of gotchas which I
attach to the monitor, saves me many happy afternoons of
headscratching ;-)
Ian Barwick
barwick(at)gmx(dot)net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sven Koehler | 2003-06-12 14:56:56 | Re: full featured alter table? |
| Previous Message | Stephan Szabo | 2003-06-12 14:44:13 | Re: full featured alter table? |