Alternatives to SQL ...

From: Gunther Schadow <gunther(at)aurora(dot)regenstrief(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Alternatives to SQL ...
Date: 2002-05-24 17:43:36
Message-ID: 3CEE7BC8.8090403@aurora.regenstrief.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,

I'm wondering about alternative accesses to a PostgreSQL data base
by means other than SQL. I know one can map many things to SQL, but
let me think outside the box for just a moment:

- Sending a parse tree in XML for processing by the optimizer.
This circumvents the SQL language and avoids the kinds of
syntactic ideosyncrasies of SQL (e.g., where you put commas.)
This is fairly trivial, but of course the question is, would
it be worth it?

- Sending an execution plan in XML directly to the executor.
This now circumvents the SQL parser and optimizer. I know this
in in a way against the relational doxology and I don't take that
light-heartedly. However, isn't it true that most optimizers
cannot deal very well with more than 6 joins? I may be wrong,
but I find myself spending quite a bit of time fighting with the
Oracle or PostgreSQL optimizer to convince it to choose the plan
that I want. There is so much magic to it with hints and the
way you write SQL (where in relational theory the expressions are
equivalent, they make huge difference in what plan is being
generated.) So, it appears to me almost easier to just send a
plan directly and have the system execute that plan.

- These direct interfaces could be a nice way to experiment with
new strategies without having to implement it on all three
layers (SQL language, optimizer, and executor.)

You noticed I sneaked in XML as the interface, and that would be
neat because with XSLT it's so easy to manipulate. But I'm also
thinking about a Prolog binding or constraint logic programming
binding, that might be better optimizeable if it goes through a
more direct path than SQL.

Am I crazy?
-Gunther

--
Gunther Schadow, M.D., Ph.D. gschadow(at)regenstrief(dot)org
Medical Information Scientist Regenstrief Institute for Health Care
Adjunct Assistant Professor Indiana University School of Medicine
tel:1(317)630-7960 http://aurora.regenstrief.org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug Fields 2002-05-24 17:45:48 Altering existing table to be WITHOUT OIDs
Previous Message Lev Lvovsky 2002-05-24 17:35:49 postgres/oracle replication?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-05-24 17:51:01 Re: Redhat 7.3 time manipulation bug
Previous Message Tom Lane 2002-05-24 17:33:14 Re: Exposed function to find table in schema search list?