Re: [sqlite] basic question about sqlite
What is the best approach to concurrency in this scenario? --- Clay Dowling <[EMAIL PROTECTED]> wrote: > > Dave Dyer said: > > > > If I designed a sqlite database to be used by a bunch of independent > > applications, for example a bunch of CGI scripts each of which > > opened the database, did some processing, and exited, would > > that be (a) safe (b) effecient ? > > It's very safe. My own product does that (see the tag line). In many > ways it's more efficient than using a database server, since opening a > file is usually faster than opening a network connection to a database > server. > > Clay > -- > Simple Content Management > http://www.ceamus.com > > __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
Re: [sqlite] Thanks for making my product possible
Ditto - sqlite is pure beauty - thanks. --- Clay Dowling <[EMAIL PROTECTED]> wrote: > Amid all the wailing and gnashing of teeth I thought that I'd just say > thanks for making a great embeddable database that puts a very minimal > burden on the developer. My product, at least, would never have seen [snip] __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: [sqlite] Re: Number of rows in a query result
What I was trying to say was: with other db products the drivers (or something somewhere) calculated the number of rows returned in a query automagicly. I have never had to do anything 'extra' to get the number of rows in a query other than resultset-object.rowcout - 'rowcout' being whatever the syntax was for that particular environment. So what I meant was, I have always taken for granted that the rowcount was 'apart of' the query returned from the database and not something that I had to do 'extra' in addition to fetching the data to begin with. I hope this was clear. - ed --- Puneet Kishor <[EMAIL PROTECTED]> wrote: > > On Oct 31, 2005, at 7:54 PM, Edward Wilson wrote: > > >> I simply count the number of elements in my record set > >> thereby avoiding a double query to the database. > > > > Yes, exactly, I take for granted that the resultset is accumulated at > > the database level and not > > at the application level. > > sorry, I don't quite understand what you imply by the above. Obviously > this discussion stems from the fact that you can't take that for > granted, at least not without paying some cost for it. Because I don't > want to tie up the db doing double queries, I just do it in the > application. > > > > > > > > > - > > ed > > > > --- Puneet Kishor <[EMAIL PROTECTED]> wrote: > > > >> > >> On Oct 28, 2005, at 7:20 PM, SRS wrote: > >> > >>> Edward Wilson wrote: > >>> > >>>> The idea of issuing two selects is, well, a hack, and knowing how > >>>> many records one has in a > >>>> result-set is a powerful feature > >>>> > >>> > >>> Are you needing a progress bar for the search (ie the query?) Or some > >>> action based on the result set? If the later, get the result set as > >>> your favorite container.. ask the container the size. If its the > >>> first then a "feature" won't help. It still has to 'run' the query > >>> in > >>> order to get the count. It would be like me asking you to tell me > >>> how > >>> many red Skittles are in a package before you open it. As for being a > >>> 'hack' .. all your 'feature' would be is a pretty programming > >>> interface around that hack. As I said before, how can the database > >>> know the number of items that will be returned without first > >>> searching > >>> for them. > >>> > >> > >> I think the problem is not so much (at least IMHO) that two queries > >> have to be performed (that itself is a reasonable expectation), but > >> that the COUNT(*) query is likely to be slow because of the full table > >> scan. One option is to use an aftermarket solution... for example, in > >> my Perl applications once I have queried the db for the columns based > >> on my criteria, I simply count the number of elements in my record set > >> thereby avoiding a double query to the database. Although, in reality, > >> I personally don't mind the COUNT(*) option... none of my databases > >> are > >> that large to merit worrying about this. > >> > >> > > > > > > > > > > __ > > Start your day with Yahoo! - Make it your home page! > > http://www.yahoo.com/r/hs > > __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
Re: [sqlite] Re: Number of rows in a query result
>I simply count the number of elements in my record set >thereby avoiding a double query to the database. Yes, exactly, I take for granted that the resultset is accumulated at the database level and not at the application level. - ed --- Puneet Kishor <[EMAIL PROTECTED]> wrote: > > On Oct 28, 2005, at 7:20 PM, SRS wrote: > > > Edward Wilson wrote: > > > >> The idea of issuing two selects is, well, a hack, and knowing how > >> many records one has in a > >> result-set is a powerful feature > >> > > > > Are you needing a progress bar for the search (ie the query?) Or some > > action based on the result set? If the later, get the result set as > > your favorite container.. ask the container the size. If its the > > first then a "feature" won't help. It still has to 'run' the query in > > order to get the count. It would be like me asking you to tell me how > > many red Skittles are in a package before you open it. As for being a > > 'hack' .. all your 'feature' would be is a pretty programming > > interface around that hack. As I said before, how can the database > > know the number of items that will be returned without first searching > > for them. > > > > I think the problem is not so much (at least IMHO) that two queries > have to be performed (that itself is a reasonable expectation), but > that the COUNT(*) query is likely to be slow because of the full table > scan. One option is to use an aftermarket solution... for example, in > my Perl applications once I have queried the db for the columns based > on my criteria, I simply count the number of elements in my record set > thereby avoiding a double query to the database. Although, in reality, > I personally don't mind the COUNT(*) option... none of my databases are > that large to merit worrying about this. > > __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
Re: [sqlite] Re: Number of rows in a query result
Sqlite-Kernel-Hackers: This is really an important feature to have, I am surprised it's not already there. I too have had the same question but have just never asked. btw, is this by any chance on the feature road-map? The idea of issuing two selects is, well, a hack, and knowing how many records one has in a result-set is a powerful feature. - ed __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
Re: [sqlite] Dotnet C# support
I think you are looking for this http://adodotnetsqlite.sourceforge.net/ I wrote my own driver in C++ (boy, that was a lot of work) then discovered the above. - ed --- Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: > Hi Darren, > > > Is there a version which will work for dotnot? > > If not then you can use every win32 dll in C# using P/Invoke > > --- > Rgds, Wilfried > http://www.mestdagh.biz > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Re: [sqlite] SQLite is Awesome
Ditto [almost] Anyone who blesses the world with such a great gift can spell however they want ... Sqlite is a 'weapon of the warriors' -- it completely changes the game. Thanks Mr. Hipp, and congrats on your well deserved award. - e --- Chris Gurtler <[EMAIL PROTECTED]> wrote: > Hi, > > Ok, so Mr. Hipp's spelling may need a little work, but SQLite has got to be > the best bit of > software that I have come accross for quite a while. > > Thank you !! > > > Regards, > > Chris > > > > > > __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
Re: [sqlite] Richard Hipp Awarded Google-O'Reilly Open Source Award at OSCON 2005
Ditto, I can't imagine how the industry as a whole has done without something like Sqlite for so long. I plan to use Sqlite in almost everything I build going forward--it's so much better than XML files or plan text. Congratulations! and Thanks for sharing such a powerful and useful application. - ed --- Tito Ciuro <[EMAIL PROTECTED]> wrote: > Without SQLite I couldn't have done some of my projects. It's amazing > at what it does. > > Thanks a lot and congratulations! > > -- Tito > > > > --- > Tito Ciuro > Webbo, L.L.C. > http://www.webbo.com > __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail