Very slow request with many ORs in where parts

2003-02-11 Thread Artem Koutchine
Hi! I have the following table: create table law_words ( l_id int unsigned not null, w_id int unsigned not null, primary key (w_id, l_id) ); The request is: SELECT DISTINCT w0.l_id FROM law_words as w0 inner join law_words as w1 on w0.l_id=w1.l_id where w0.w_id in (258,282,... ab

Fw: Very slow request with many ORs in where parts

2003-02-11 Thread Artem Koutchine
--+ 2 rows in set (0.01 sec) - Original Message - From: "Victor Pendleton" <[EMAIL PROTECTED]> To: "'Artem Koutchine'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 5:29 PM Subject: RE:

Very slow select query with IN(...)

2003-02-12 Thread Artem Koutchine
Hi! I have posted this message yerstaday, but apperantly did not give enough information for reader to figure out what's going on. So, i am reposting it with more information. I have the following table: create table law_words ( l_id int unsigned not null, w_id int unsigned not null,

Re: Very slow select query with IN(...)

2003-02-12 Thread Artem Koutchine
but in your case Mhz > might be the best way to go since you are only doing one thing. > > > On Wednesday, February 12, 2003, at 07:50 AM, Artem Koutchine wrote: > > > I don't understand what I am doing wrong, since i thought it is > > a basic technology behind any word s

Re: Very slow select query with IN(...)

2003-02-12 Thread Artem Koutchine
> On Wed, 12 Feb 2003 15:50:29 +0300 > Artem Koutchine <[EMAIL PROTECTED]> wrote: > > > Hi! > > > > I have posted this message yerstaday, but apperantly > > did not give enough information for reader to figure out > > what's going on. So, i am repo

Are temporary tables more effective than joins?

2003-02-13 Thread Artem Koutchine
I am still stuck with my full text search engine. I have experemented with different approaches to seleting search results and figure out that having temporary tables is about 300 times faster than doing 'inner joins' The table: +---+--+--+-+-+---+ | Field

UPDATE/REPLACE command

2001-06-29 Thread Artem Koutchine
Hi! Was UPDATE/REPLACE command implemented? I mean, a command which does update and if it updated to record to match an already existing unique index then the old record is killed and the new stays. Example ( UPPLACE - UPDATE/REPLACE command): table: ids ID (primary key) NAME 1 a 2 b 3 c 4

A good problem. (have fun)

2001-07-06 Thread Artem Koutchine
Hi! There are two tables: create table a( id int primary key, name char(10), unique anamei (name) ); create table b( id int primary key, name char(10), unique bnamei (name) ); TASK: select all ids for names which are unique among both tables: example: A: 1 a 2 b 3 c 4 d

Re: Problems with text fields

2001-02-12 Thread Artem Koutchine
what's you table definition, what;s your query - Original Message - From: "Thomas Kaester(global)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 12, 2001 11:10 AM Subject: Problems with text fields > Hello everybody, > > ich have a few problems with text fields. I

Re: SQL PRIMARY KEY question

2001-02-17 Thread Artem Koutchine
Lyrics: I found it weird that people don't even realize that one must learn to learn and for that one must learn to ask questions. I also often find that people who cannot ask questions are either idiots beyond hope or very much egoists. That, of course, does not apply to every single case. There

Re: is it possible to store images in mysql db?

2001-02-17 Thread Artem Koutchine
damn it, DOES ANYBODY READ MANUALS these days? in short: yes for details: RTFM it might not be good. you probabluy want to keep filenames in the db, but files itself in the filesystems. Your choice. Artem - Original Message - From: "Nikhilesh Haval" <[EMAIL PROTECTED]> To: "mysql list"

Re: Creative solution with XML,PHP,MYSQL

2001-02-17 Thread Artem Koutchine
Relax, XML has N.O.T.H.I.N.G. to do with what you want to do. You want dynamically update (rebuild) HTML page, well, the only way to do it currently in more or less compatible way is to use javascript+DHTML. And the result will SUCK, i know, i've done it. So, go the way the elders did. Refresh th

Re: [PHP] Re: Creative solution with XML,PHP,MYSQL

2001-02-17 Thread Artem Koutchine
Aha, java is even better :) - Original Message - From: "Brian V Bonini" <[EMAIL PROTECTED]> To: "Peter Skipworth" <[EMAIL PROTECTED]>; "Siim Einfeldt aka Itpunk" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: special characters in MySQL query

2001-02-17 Thread Artem Koutchine
No, solve it in your own program. - Original Message - From: "Robert Heron" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 17, 2001 6:35 PM Subject: special characters in MySQL query > I have written a program which reads data from WWW forms and passes it to > MyS

Re: [PHP] Re: Creative solution with XML,PHP,MYSQL

2001-02-17 Thread Artem Koutchine
I said Java. Java i said. Java said I. - Original Message - From: "Wernher Korff" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 17, 2001 6:53 PM Subject: RE: [PHP] Re: Creative solution with XML,PHP,MYSQL > can yopu link a database to flash? > van > > -Origina

Re: Apache 1.3.17 and mod_auth_mysql problem.

2001-02-17 Thread Artem Koutchine
try mod_auth_mda or some generic auth module which allows authrization via any script. However, i am happily using mod_auth_mysql with 1.3.14, however i build from the port on mysql with some magic envolved. However, i didn't try to build it with 1.3.17 - Original Message - From: "Erik Tj

INSERT DELAYED crashes Mysql 3.23.33

2001-02-22 Thread Artem Koutchine
Hi! I am trying to insert 1 000 000 records into a very simple table: create table test ( a1 tinyint unsigned not null, a2 tinyint unsigned not null, a3 tinyint unsigned not null, a4 tinyint unsigned not null, primary key (a1,a2,a3,a4) ); So, to make it faste

INSERT/REPLACE lock up in 3.23.33

2001-02-22 Thread Artem Koutchine
$data[6]+0, $data[7]+0 ) || die "Cannot execute query"; } close A; } $DBH->disconnect(); What would cause the lockup problem? MySQL: 3.23.33 compiled from tar ball with compi

Re: INSERT/REPLACE lock up in 3.23.33

2001-02-23 Thread Artem Koutchine
Hi! You have probably missed the original message. I have pointed that I have build Mysql 3.23.33 from the original TAR ball on FreeBSD 4.2-STABLE using comiler options which are used in the port of MySQL for FreeBSD, so it does not crush on high loads. After all this i am getting server crushed

a query which cannot be fast even theoretically?

2001-02-23 Thread Artem Koutchine
Hi! Here is a worst case i have even seem so far: create table aa( some_numberint unsigned not null, indexaa_sn (some_number) ); create table bb( min_numberint unsigned not null, max_numberint unsigned not null, range_typechar(1) not null, primary key

INSERT DELAYED DOES NOT WORK (Sinisa, please, read this carefully)

2001-02-24 Thread Artem Koutchine
any database with ant tables using any 3.23.xx It just says "Server has gone away". Sinisa, i want to point out that this is not LINUX, it is FreeBSD which is fully rebuild weekly from cvs. What shoudl i do to make it work? Regards, Artem

INSERT DELAYED still keeps CRUSHING (trying everything)

2001-03-01 Thread Artem Koutchine
Hello again! In the prev episode i said that when i do INSERT DELAYED mysql just catches sig 11, crashes and restarts. No record inserted whatsoever. Nothing is written into the update log. Here is a sample (even though it says 1 row affected, it is actually not affected. nothing is inserted):

Re: Use Ukrainian lenguage.

2001-03-01 Thread Artem Koutchine
when do configure: --with-charset=win-1251 It is clearly explained in the manual. READ THE MANUAL! - Original Message - From: "Rolf Hopkins" <[EMAIL PROTECTED]> To: "Vitaly Dugaev" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, March 01, 2001 6:59 PM Subject: Re: Use Ukrainian l

Re: INSERT DELAYED still keeps CRUSHING (trying everything)

2001-03-01 Thread Artem Koutchine
AIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 01, 2001 8:58 PM Subject: Re: INSERT DELAYED still keeps CRUSHING (trying everything) > Artem Koutchine writes: > > Hello again! > > > > In the prev episode i said that whe

Unknown database problem

2001-08-31 Thread Artem Koutchine
Hi! I having a very weird unpredictable problem. A script run from cron at 2:00am every day must conect to database 'ubex' and do some stuff with it. The script is in perl and uses DBI. It works fine pretty much all the time but sometimes (1 or 2 time per month) it gives an error: Unknown databa

Weird Index usage n 3.23.36

2001-04-12 Thread Artem Koutchine
Hi! I have notice a very weird index selection when execution a query in 3.23.36. Here is an example: The table is: mysql> describe words; ++--+--+-+ -+---+ | Field | Type | Null | Key | Default | Extra | +--

Re: Unable to Solve NOT IN Problem ....

2001-04-26 Thread Artem Koutchine
I wonder how people use RDBMS w/o ever reading manuals. Do they get paid for their work? - Original Message - From: "Sheshadri YS" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 26, 2001 6:57 PM Subject: Unable to Solve NOT IN Problem Respected Sir, We are facin

Re: Foreign Key in creating tables

2001-05-19 Thread Artem Koutchine
RT-F***ING-M! No foreign keys in mysql! - Original Message - From: "Russell Teo Wee Liang" <[EMAIL PROTECTED]> To: "mysql mailing list" <[EMAIL PROTECTED]> Sent: Saturday, May 19, 2001 8:03 PM Subject: Foreign Key in creating tables Hi all, I create a sample database using foreign key

Re: Foreign Key in creating tables

2001-05-19 Thread Artem Koutchine
27; keyword? Or just grep the manual so you find all possible information for the subject in question. PS: Replies like mine are not waste of time. They are psychological burn-out. They make you feel better:) - Original Message - From: "Nisha Raju" <[EMAIL PROTECTED]> To: &quo

Re: Advice needed....

2001-05-19 Thread Artem Koutchine
Hi! It;s been a while since i used Access, so i can't remember exactly what you mean. But for what you've said you probably have three choises: 1) Create a primary key, try to insert a record with already existing key and fail. Failure means that record already exists. Nothing special. 2)

Re: Foreign Key in creating tables

2001-05-19 Thread Artem Koutchine
ection 5.4 Functionality Missing from MySQL." I repeat: "don't actually do anything" That means not a single thing, right? - Original Message - From: "Russell Teo Wee Liang" <[EMAIL PROTECTED]> To: "Artem Koutchine" <[EMAIL PROTECTED]>; &quo

Re: Foreign Key in creating tables

2001-05-19 Thread Artem Koutchine
work. - Original Message - From: "Russell Teo Wee Liang" <[EMAIL PROTECTED]> To: "Artem Koutchine" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, May 19, 2001 9:59 PM Subject: Re: Foreign Key in creating tables > To infer without actual proof or evid

Re: Importing spreadsheet data into MySQL

2001-06-06 Thread Artem Koutchine
There is a module for Perl which can read Excel. Then there is DBI for accessing MySQL. Use both to transfer data. If under Windows, you coudl also use ODBC and some ActiveX control under Visual Basic for quick and dirty transfer scripting. - Original Message - From: "Chris L. Gray" <[EM

Connection Freeze (new feature proposal)

2001-01-19 Thread Artem Koutchine
red recods sys_commit to 1 Sure, all SQL queries must manipulate only records with sys_commit to 1, and all other must be considered non-existing and cleaned up periodically. What do you think? (And Yes, i am aware of persistant database handlers which live in the web server space). Artem

Checking if a date is correct

2001-01-21 Thread Artem Koutchine
try doing "SELECT UNIX_TIMESTAMP('1990-2-31')" and you'll get a number. This is very weird, since this is an incorrect date. Is there any way to figure out if a date is correct in mysql SQL implementation? And why UNIX_TIMESTAMP does not return NULL for incorrect date? Artem --

Re: OT - Cron

2001-01-25 Thread Artem Koutchine
take your time and read man crontab - Original Message - From: "Derek Almond" <[EMAIL PROTECTED]> To: "Derek Almond" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 25, 2001 1:25 PM Subject: Re: OT - Cron > Actually now I look thats not the one i me

Re: How to use a database from Sun solaris to Linux

2001-01-26 Thread Artem Koutchine
AFAIK, ISD, ISM is isam type table which are platform dependent. So, you cannot just COPY them. You need to do something trikier (sqldump and then restore using mysql) MYD, MYI - are myisam tables and they are declarede platform independet. You can move then around w/o trouble (AFAIK again). Mys

Not a lame question about index usage of MySQL

2001-01-26 Thread Artem Koutchine
The manual says that if two seprate single-column indexes exist on two different colums (col1, col2) and someone issues a query: SELECT * FROM tbl_name WHERE col1=val1 AND col2=val2 optimizer will choose the index which matches the least records and use it. This is it. Manual does not say what

Re: If exists UPDATE else INSERT

2001-01-26 Thread Artem Koutchine
I've seen something about this in the manual. At the moment the problem was how to call such an SQL command (like REPLACE for DELETE/INSERT). I wonder if it was implemented in 3.23.32 or is it only in 4.x? - Original Message - From: "Jan Willamowius" <[EMAIL PROTECTED]> To: <[EMAIL PROTEC

Re: 3.23.32 + FreeBSD 4.2 /w Lastest Snapshots - Still CoreDump

2001-01-26 Thread Artem Koutchine
> Beside Jeremy's notable comment, please try latest FreeBSD binary > available on our site. > > Also follow Ken Manzel's info on FreeBSD 4.* patches. > > The fact that you have SMP kernel should not matter much, as FreeBSD > native threads can not use SMP for threaded servers. > > If you still ge

Re: need help

2001-01-26 Thread Artem Koutchine
What do you mean "get stuck". You some kind of error or just it does shows that it compiles it and makes you wait a lot. Well, if you look a bit above you will see that the following compile may take a long time and IT DOES TAKE A VERY LONG TIME ON SLOW MACHINES. So.. WAIT! If you got error, then

FreeBSD 4.2-stable + MySQL 3.23.32 sig 11 problem

2001-01-27 Thread Artem Koutchine
Hi! I am having this weird problem that MySQL just dies with signal 11 several time per day when loads get just a bit hight (the load is very low, about 1 q/s and on some export ops it gets a bit high two time per 24 hours). Any way, FreeBSD 4.2 is not RELASE but STABLE which is cvsupped pretty o

Re: (+) Help needed

2001-01-27 Thread Artem Koutchine
Don't you think this has nothing specific to MySQL? Maybe you should read some books on SQL and the manual for MySQL? SELECT * FROM tablename WHERE datefield>'2001-01-11' AND datefied<'2001-02-12' Don;t ask how to correctly call the query in perl, read perldoc DBI perldoc DBD::mysql

Re: (+)Help

2001-01-27 Thread Artem Koutchine
RTFM on Replication or do develop own methods! SEARCH THE LIST (start from www.mysql.com Documention/Mail lists) - Original Message - From: "Alexei Sh." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 27, 2001 8:20 PM Subject: (+)Help > I have two mysql server with s

Re: 3 million+ records problems.

2001-01-27 Thread Artem Koutchine
Well then, be so kind and tell us your index configuration and your hardware configuration. - Original Message - From: "Manuel Capinha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 27, 2001 9:10 PM Subject: 3 million+ records problems. > Hi! > > I've got a table w

Re: 3 million+ records problems.

2001-01-27 Thread Artem Koutchine
el Capinha" <[EMAIL PROTECTED]> To: "Artem Koutchine" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, January 27, 2001 9:27 PM Subject: Re: 3 million+ records problems. > > From a mysqldump: > > # > # Table structure for table 'names'

FS setup for MySQL (Was : RAW Device support)

2001-01-27 Thread Artem Koutchine
Interesting, how will MySQL benefit from using -async -noatime options for filesystem it is keeping its data on or from using SoftUpdates (for FreeBSD in particular). Anybody experimented? Artem - Original Message - From: "Dan Nelson" <[EMAIL PROTECTED]> To: "Nazeem Y" <[EMAIL PROTECTE

Re: MySQL problems on OpenBSD?

2001-01-28 Thread Artem Koutchine
You might take a look at my message about MySQL 3.23.32 and FreeBSD 4.2-stable try doing what i did there. I did it only yersterday but so far not sig 11. Me message is posted yersterday and it has FreeBSD 4.2-stable in the subject and it is from me (Artem Koutchine). Search for it

Re: How to avoid ERROR :1045

2001-01-28 Thread Artem Koutchine
i don't know exactly, but based on the message it seems to be a permission problem in the mysql rights. So, RTFM on the mysql permission model and commands. - Original Message - From: "Velamarthy Murthy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 28, 2001 3:08 PM

Re: Start from scratch

2001-01-28 Thread Artem Koutchine
Why not just reinit the database as specified in the last step on install (after make install) in the manual. No need to delete your database, just back them up somewhere else. Then delete eveyrthing in your localstatedir (where thedatabases are) including 'mysql' dir. Do reinit, and copy back al

Re: Start from scratch

2001-01-28 Thread Artem Koutchine
I have no idea what 'apt-get' is. MySQL, IMHO, should always be installed from the sources by compiling by hands. Get the sources and learn to install it correctly. - Original Message - From: "John-Mark" <[EMAIL PROTECTED]> To: "Artem Koutchine" &l

Re: Copying Database

2001-01-29 Thread Artem Koutchine
This is totally weird! Untar should be faster then tar on a any normal computer under normal os with normal hdds. So, your problem could be: 1) Your hdds are way too slow 2) Incorrect HDD interface setup 3) Your FS setup is terrible (like no write chaching at all) 4) The machine which you are unta

Re: Copying Database

2001-01-29 Thread Artem Koutchine
on UFS (on FreeBSD 3.2 3.4 3.5 4.1.1 and 4.2) > and ext2 (on newest Debian release) > 4) It's on Dual xeon P2 400 1MB Cache, with 1G ram on board > > It's slow because it contains many files. i.e. Reading a big files is always > faster than reading many small files > &g

Re: Large fields vs. performance

2001-01-30 Thread Artem Koutchine
I am not good at DB theory, but in our practice (SQL DB development form WEB since 97) splitting a table to get recrods to be fixed length is always beneficial when table is in haavy use. You can get fast lookups and just a bit slower inserts, but since, inserts are usually much rare compared to s

Re: Error 127: table handler

2001-01-30 Thread Artem Koutchine
mysqladmin shutdown myisamchk -o ./*.MYI myisamchk -r ./*.MYI (or isamchk if you are using the old isam tables) then restart mysql. - Original Message - From: "Frédéric Bonjour" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 30, 2001 1:05 PM Subject: Error 127: tabl

Re: Large fields vs. performance

2001-01-30 Thread Artem Koutchine
e or reconfigure your OS or/and FS or/and MySQL. Anyway, my string opinion is that you should split the table. As i said before that we've been doing for years now (keep all blob, text fields in separate tables). For me it is a strict rule by n

Re: Large fields vs. performance

2001-01-30 Thread Artem Koutchine
It is all application dependent, if you need to most select all data except the text field, then you'll win a lot, if you need to select the text field all the time then why bother with split in the first place? Artem Koutchine - Original Message - From: "Torkil Grindstein&quo