Re: Simplified (a-la [G|N]DBM) DB access

From: Dan Sugalski <dan(at)sidhe(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Simplified (a-la [G|N]DBM) DB access
Date: 2005-04-20 13:09:41
Message-ID: a0621020bbe8bfff41262@[172.24.18.155]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 10:05 AM +0400 4/20/05, Alexandre wrote:
>On Apr 19, 2005, at 23:24, Dan Sugalski wrote:
>
>>At 9:40 PM +0400 4/19/05, Alexandre wrote:
>>>Lane, thank you, but it is not: PostISAM "generates SQL statements
>>>on the fly from traditional ISAM (read, write, start) statements",
>>>so it just add overhead, and is not what I'm looking for.
>>
>>Speaking from experience, as I have a system which hides Postgres
>>behind an ISAM interface (though not PostISAM -- I rolled my own DB
>>library) as part of a legacy 4GL migration, the overhead's
>>ignorable. Dismissing it for that reason's not a good idea.
>
>Does your own ISAM interface also convert ISAM calls to the SQL queries?

Yes of course -- it has to, there's no other way to access Postgres.

>If so, then it is also add overhead: make a call to the some
>wrapper, which will generate SQL query and send it to the sever,
>which will parse, plan and compile it and execute only after that.
>Desirable: make a call, which will connect to the server and get row.

Right. And, as I said, the overhead is ignorable. It just doesn't matter.

>I didn't have any legacy application, which I need to move to the
>new DB, I just need more simple and fast access.

Then either use PostISAM or write your own wrapper code to present an
ISAM interface.

You really need to understand that there's *already* a lot of
overhead involved in Postgres, or any other relational database. ACID
guarantees aren't free. Compared to the costs involved in Postgres,
as well as in any app that's using the ISAM interface, the extra
costs in the wrapping are negligible.

Bluntly, you're worrying about the wrong stuff. Just write the
wrappers, prepare the SQL statements (hell, pregenerate them if you
want -- they don't have to be created on the fly), and ignore the
library until it ends up being worth worrying about. You'll be
ignoring it for a very long time.
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
dan(at)sidhe(dot)org have teddy bears and even
teddy bears get drunk

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message K.RajaSekar 2005-04-20 13:18:20 UNSUBSCRIBE
Previous Message vinita bansal 2005-04-20 13:02:51 Re: reorder table data