Re: [PG-nuke-devel] Rewriter?
Brought to you by:
mazzabr
From: <rv...@dd...> - 2003-05-30 07:13:59
|
> > > > -------------------- > Looking for a better .sig. Suggestions are being accepted. > > On Fri, 30 May 2003 rv...@dd... wrote: > > !Hey Payam, > > (...) > > !The good thing is that we can easely upgrade to a higher nuke version > because > !we only have ONE file to test... > !The bad part is that the rewriter code will consume some processor time. On > my > !machine (PII 233Mhz) it currently takes arounf 250ms to rewrite 144 SQL > !statements. > > That's where we had to choose, the first option, propoused by Ries is the > rewriter, much more pratice and efficient, although it has some > performance issues. > > The other option was a set of scripts, probably perl, that would rewrite > each query, which wouldn't be that efficient and wouldn't be very > pratical. But it would give us a better performance. > > The solution until now is the query cache. (Ries correct me if I > understood it wrong) Correct.. > > If you take a look there are plenty of queries that do exactly the same > thing, so we can cache them and expect a better performance. And that's > the main issue that we are trying to get better and better. Partly right... I did query the DBA a lot because I some cases (inserts quertys) I need to find out which field is a serialfield. That query to the backend is rather complex and takes a lot of extra time because you need to talk to the backend twice for each single query. Currenty I cache these querys, not the querys nuke generates.. > > I had another idea, we could have two levels of cache. The first would > have a per page scope, being valid only in a given page. Another would be > valid for all generated page for a given period of time. Both together > shall give us a even better performance. mazza, what do you want to cache here?? 1) The sql itself 2) The result of the SQL? If you think about option 1...I'm thinking about this to. One idea is to create a MD5 for each query and store the result of it in a cache. Then when a new query comes in it first checks the query cache and only when it's not in it does the rewriter thing or else it retreivers the new query from the cache. BTW: most of the sql querys are select querys and I already did some optimalisation on them. If you think about option 2 I would so..no don't do that becasue you would comprimse the idea of a database backend. Appart from that it takes a huge a lot of memory per session. > > But let's take a look at our target market. Corporations usually have > DBAs that are able to optimize PostgreSQL so the have a better > performance, even though we must enhance performance as much as we can. > > mazza. > > ! > ! > !Hope this clearifies... > ! > !Ries > ! > ! > ! > ! > ! > !Citeren Payam bahraini <p_b...@ya...>: > ! > !> Hi all, > !> > !> I'm a newbie and so idon't know what is a rewriter and > !> why it is necessary? > !> > !> Tnx > !> > !> Payam > !> > !> __________________________________ > !> Do you Yahoo!? > !> Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > !> http://calendar.yahoo.com > !> > !> > !> ------------------------------------------------------- > !> This SF.net email is sponsored by: eBay > !> Get office equipment for less on eBay! > !> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > !> _______________________________________________ > !> PG-nuke-devel mailing list > !> PG-...@li... > !> https://lists.sourceforge.net/lists/listinfo/pg-nuke-devel > !> > !> > ! > ! > ! > ! > ! > !------------------------------------------------------- > !This SF.net email is sponsored by: eBay > !Get office equipment for less on eBay! > !http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > !_______________________________________________ > !PG-nuke-devel mailing list > !PG-...@li... > !https://lists.sourceforge.net/lists/listinfo/pg-nuke-devel > ! > > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > PG-nuke-devel mailing list > PG-...@li... > https://lists.sourceforge.net/lists/listinfo/pg-nuke-devel > > |