Re: dlr_sdb bug

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Centrium GmbH
Message-ID <[email protected]>
Hi,

On Wednesday 17 September 2003 04:40, Rory Campbell-Lange wrote:
> On 17/09/03, Andreas Fink ([email protected]) wrote:
> > On Mittwoch, September 17, 2003, at 02:24  Uhr, Rory Campbell-Lange
> >
> > wrote:
> > > Hi. I've been playing around using sdb for my dlr storage. I've got
> > > it working nicely for Postgresql. However I had to do some muddling
> > > around with the code (I've never worked with C before) after noting
> > > some oddities in the database calls.
> > >
> > > UPDATE and DELETE don't take "Limit" clauses, certainly not for
> > > Postgres.
> >
> > You can remove the LIMIT clauses, they are safety checks only to only
> > modify one record if for some reasons there are two found.
> > This should only happen if you send more than one message per second to
> > the same destination over the same SMSC and get the same timestamp.
>
> Hi Andreas. My point is that the LIMIT clauses are not optional for
> Postgres. You simply can't have them.

that was a reason why I added sdb_get_limit_str(), so if db support another 
limit clause (as oracle ROWNUM) then you can just add it there... Using 
libsdb is anyway a bad idea, because libsdb doesn't support persistent db 
connections. And from my experience, I know that opening a db connection take 
more time as sql statement itself. 

>
> Is there a way we could do this update on a unique id rather than the
> timestamp (i.e. Kannel uses a value from the db rather than provide the
> key?). For large dbs this could be optimised to provide very quick
> performaance.

Heh, in order to find this unique key you must make select statement anyway. 
Later if you have found a appropriate row, yes we should do it. But if you 
speek about performance, then first what we should do (imo): get rid of 
libsdb support and add native db support for db's we want...

Btw. I'm working on the patch that will get more dlr performance, so pls wait 
a bit:)

>
> Rory

-- 
Best regards / Mit besten Grüßen aus Düsseldorf

Dipl.-Ing.
Alexander Malysh
___________________________________________

Centrium GmbH
Vogelsanger Weg 80
40470 Düsseldorf

Fon: +49 (0211) 74 84 51 80
Fax: +49 (0211) 277 49 109

email: [email protected]
web: www.centrium.de
msn: [email protected]
icq: 98063111
___________________________________________

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.