Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Steven Fisher
On 14-Feb-2008, at 12:27 PM, Stephen Oberholtzer wrote:

> I'd love to know
> what frame of mind I was in when I wrote it, because I'm pretty sure I
> wouldn't have come up with the name 'MaterializeView' if I had tried
> to write the patch today.

Altered frames of mind are responsible for both the best and worst  
code in the world. :)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Stephen Oberholtzer
On Thu, Feb 14, 2008 at 10:17 AM, Dennis Cote <[EMAIL PROTECTED]> wrote:
> Stephen Oberholtzer wrote:
>
>  Stephen,
>
>  FYI, your ticket was fixed on Tuesday by checkin 4782 in case you hadn't
>  noticed.
>
>  Dennis Cote
>

Wow, awesome! My claim to fame -- I submitted a patch to an
open-source project and it got accepted!  (Actually, I've done it once
before, in Subversion, but this is for a feature that actually has a
chance at being used!)

It even looks like my patch was still mostly valid.  I'd love to know
what frame of mind I was in when I wrote it, because I'm pretty sure I
wouldn't have come up with the name 'MaterializeView' if I had tried
to write the patch today.

-- 
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] View update performance (was: Updatable views)

2008-02-14 Thread Dennis Cote
Stephen Oberholtzer wrote:
> 
> If only you'd been around when I'd posted my message! Nobody said
> *anything*, so I figured nobody else cared about it.
> 
> I have reposted my mailing list message, with attachments, here:
> http://www.sqlite.org/cvstrac/tktview?tn=2938
> 
> I have not updated the patch, however.  It *should* be pretty
> straightforward -- looking at it again, it doesn't actually seem to do
> any VDBE code itself, so who knows?
> 

Stephen,

FYI, your ticket was fixed on Tuesday by checkin 4782 in case you hadn't 
noticed.

Dennis Cote

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] View update performance (was: Updatable views)

2008-02-12 Thread Dennis Cote
Stephen Oberholtzer wrote:
> 
> If only you'd been around when I'd posted my message! Nobody said
> *anything*, so I figured nobody else cared about it.
> 

I have been around for quite some time, but I don't recall your message. 
However, I do occasionally take a vacation, or get busy and just skim 
the postings. :-)

I'm glad you didn't give up on your idea.

Dennis Cote
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] View update performance (was: Updatable views)

2008-02-11 Thread Stephen Oberholtzer
On Feb 11, 2008 1:53 PM, Dennis Cote <[EMAIL PROTECTED]> wrote:
>
> Stephen Oberholtzer wrote:
> > I should note that there's a gross inefficiency when using triggers to
> > handle updates or deletes against views; SQLite does the equivalent of
> > this:
> >
> > For UPDATE  ...  WHERE ,  SQLite copies the entire
> > source view into the temp table.
> >
> > SELECT * INTO  FROM 
> >
> > Then, it iterates over , looking for rows that match
> > , and *then* runs the trigger on them.  This means that if
> > your source view is large, this will run slowly.
> >
> > I submitted a patch a long while ago to optimize this by turning the
> > initial temp-table population into "SELECT * INTO  FROM
> >  WHERE ", which worked much faster, but I don't think
> > anything came of it.
> >
> > (my original msg to this list:
> > http://readlist.com/lists/sqlite.org/sqlite-users/2/11029.html )
> >
> >
> >
>
> Stephen,
>
> This does seem like a good idea.
>
> The SQLite mailing list doesn't pass files attached to submissions, so
> no one saw your patch. I would suggest creating at ticket at
> http://www.sqlite.org/cvstrac/captcha?nxp=/cvstrac/tktnew and posting
> your message, or a link to it, along with your patch.
>
> I suspect the patch itself will probably have to be modified, since
> SQLite recently underwent significant changes to its code generation
> routines.
>
> As with all patches, it will be reviewed and accepted much faster if it
> passes the test suite.
>
>
> HTH
> Dennis Cote

If only you'd been around when I'd posted my message! Nobody said
*anything*, so I figured nobody else cared about it.

I have reposted my mailing list message, with attachments, here:
http://www.sqlite.org/cvstrac/tktview?tn=2938

I have not updated the patch, however.  It *should* be pretty
straightforward -- looking at it again, it doesn't actually seem to do
any VDBE code itself, so who knows?

-- 
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users