Re: Rev cgi mySQL (again) -- Valentina Server have server side cursors

2009-01-03 Thread Ruslan Zasukhin
On 1/3/09 2:03 AM, Bob Sneidar b...@twft.com wrote: Hi Bob, Hi All, I have always toyed with the idea of writing a paging query system which paged through a large SQL database. The idea would be that you only have one live cursor but 2 or 3 pages (cursors) forward and back. As the user

Re: Rev cgi mySQL (again)

2009-01-03 Thread jbv
Hello again, For those interested in the latest episodes of my struggle with mySQL, here's a summary : I've tried the MATCH (col1) AGAINST (word1 word2) construct, and it's blazing fast (roughly 50 to 100 times faster than my previous queries full of OR statements... But there's a couple of

Re: Rev cgi mySQL (again)

2009-01-03 Thread Brian Yennie
JB, If you are interested (and able to share), send me a dump of your database off-list. I do a lot of MySQL work and although what you are doing may be a design limitation, I'd be willing to fiddle with it for a few minutes, which is infinitely more productive than speculating in emails

Re: Rev cgi mySQL (again)

2009-01-03 Thread stephen barncard
I'm with you on that - use what one knows of mysql to get a bulk data block, then use chunk expressions to further parse I used to feel guilty that I didn't do it all in MYSQL, using views and other tricks, but these days I'm ok with it. On Fri, Jan 2, 2009 at 6:31 PM, Sarah Reichelt

Re: Rev cgi mySQL (again)

2009-01-03 Thread Brian Yennie
I'm a huge fan of practical solutions, and this approach is definitely a good one if you are never going to be dealing with millions of records. Modern processing can do an awful lot without a real database muddying things up. The only thing I would add is that if you ARE going to deal

Rev cgi mySQL (again)

2009-01-02 Thread jbv
Hi there I have a mySQL table with about 4 entries. I also have a Rev cgi 2.5 script that sends (very) complex SELECT requests; in which the WHERE part can feature as much as 50 nested booleans winth and, or, binary etc For quite some time I realized that requests to mySQL slow down my

Re: Rev cgi mySQL (again)

2009-01-02 Thread Bill Marriott
I'm curious to know if anyone already faced the need to (almost) completely drop SQL in favor of Transcript for DB data search... Without seeing the SELECT command and knowing how the database is set up, it's hard to know whether dropping MySQL is prudent or not. It's not too difficult for

Re: Rev cgi mySQL (again)

2009-01-02 Thread Ruslan Zasukhin
On 1/2/09 2:49 PM, jbv jbv.silen...@club-internet.fr wrote: Hi there I have a mySQL table with about 4 entries. I also have a Rev cgi 2.5 script that sends (very) complex SELECT requests; in which the WHERE part can feature as much as 50 nested booleans winth and, or, binary etc

Re: Rev cgi mySQL (again)

2009-01-02 Thread jbv
Bill, Ruslan, Thanks for your answers. To answer some of your questions, I only need to read data from mySQL, and the nested booleans are of the ( ... OR ... OR ...) AND ( ... OR ...) type. I don't if anyone's interested, but here are examples of my code : --example 1 : using mySQL put

Re: Rev cgi mySQL (again)

2009-01-02 Thread Bill Marriott
Hi jbv, I am less of an expert with SQL than many, but I think you can simplify your query a bit using the MATCH...AGAINST keywords: for example, the first part (b) of your query might look like: -- convert myList1 to a space-delimited items SELECT Col10, Col11, Col12, Col13, Col14, Col15

Re: Rev cgi mySQL (again)

2009-01-02 Thread jbv
Bill, Hi jbv, I am less of an expert with SQL than many, but I think you can simplify your query a bit using the MATCH...AGAINST keywords: for example, the first part (b) of your query might look like: -- convert myList1 to a space-delimited items SELECT Col10, Col11, Col12, Col13,

Re: Rev cgi mySQL (again)

2009-01-02 Thread Jan Schenkel
--- jbv jbv.silen...@club-internet.fr wrote: Last but not least, in my examples, I don't think the performance difference is in the data transfer. Actually, the fact that the boolean part of the query can feature up to 50 elements doesn't imply that the amount of data returned will be

Re: Rev cgi mySQL (again)

2009-01-02 Thread jbv
Jan, Thanks for the comment. If you guys are interested, here is a clue on how my table is structured : there are 2 columns (varchar type) Col1 and Col2 containing single words. The additional part (with the / construct) happens very seldom, so I guess it can be ignored in the performance

Re: Rev cgi mySQL (again)

2009-01-02 Thread Bob Sneidar
Hi JB. I have always toyed with the idea of writing a paging query system which paged through a large SQL database. The idea would be that you only have one live cursor but 2 or 3 pages (cursors) forward and back. As the user scrolls past the current page you silently swap the pointer to

Re: Rev cgi mySQL (again)

2009-01-02 Thread william humphrey
I'm interested in what Bill said: notice that I use single quotes to enclose strings; you shouldn't need your q business cluttering things up I'm constantly doing that because I build the SQL in RunRev and then send it. I'd like to see an example of a SQL built in RunRev put select table q

Re: Rev cgi mySQL (again

2009-01-02 Thread william humphrey
It's interesting hearing you guys talk some about SQL. I've noticed too how much better RunRev is at processing big blocks of text and how that works so nicely with having a fully normalized SQL database in conjunction. I used to notice some slow SQL processes in SQLite but now I'm doing almost

Re: Rev cgi mySQL (again)

2009-01-02 Thread Bob Sneidar
This brings up an interesting point. Given the constraints of Revolution Cursors (being loaded into memory) has anyone figured out what the maximum data block size is for Revolution? If one knew that, they could deduce from the structure of their SQL database approximately how many records

Re: Rev cgi mySQL (again)

2009-01-02 Thread Dave Cragg
On 2 Jan 2009, at 20:38, jbv wrote: So the query is quite straightforward, for instance : SELECT Col1, Col2, Col3, Col4 FROM myTable WHERE Col1 = toto OR Col2 = toto OR Col1 = tata OR Col2 = tata OR Col1 = titi OR Col2 = titi... up to possibly 50 elements. I think all those OR conditions

Re: Rev cgi mySQL (again)

2009-01-02 Thread Dave Cragg
Sorry, syntax error in my last post: Should be: ( SELECT Col1, Col2, Col3, Col4 FROM myTable WHERE Col1 IN ('toto','tiki','tata','etc.') ) UNION DISTINCT ( SELECT Col1, Col2, Col3, Col4 FROM myTable WHERE Col2 IN ('toto','tiki','tata','etc.') )

Re: Rev cgi mySQL (again)

2009-01-02 Thread Sarah Reichelt
finally, I tried the following : I dumped the content of myTable as a text file, opened it in the Rev script, and did the selection of records inside a repeat for each line loop. And to my surprise, the speed of the script improved to almost 40% (which is a lot for a script that used to