Will this make a mess

2002-01-02 Thread Goran Krajacic
In my program i first make a lot of REPLACEs (1 and even more) and immediately after that i make a SELECT on the same table. Is it posible that MySQL messes up and makes the SELECT before the last REPLACE is done? Thanks Goran

Indexes in temporary tables

2001-12-29 Thread Goran Krajacic
I wonder if mysql uses indexes in temporary tables(when making a join on temp tables etc.)? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list

How to optimize this

2001-12-28 Thread Goran Krajacic
How to optimize this query: SELECT col1, col2, MAX(col3) FROM Table WHERE col42 AND col5 = 2 GROUP BY col3 LIMIT 1; The best that i figured out is to set the index on col3. I was unable to find out the working combination for multi-column indexing. Please advice.

select, replace priority

2001-12-22 Thread Goran Krajacic
I have a php file with 1. CREATE TEMPORARY TABLE on tableA; 2. REPLACE into tableA; 3. CREATE TEMPORARY TABLE on tableA; 4. REPLACE into tableA; Can i be sure that the REPLACE in step 2. will be finished before the TEMPORARY table in step 3. is made?

Limit in SELECT

2001-08-05 Thread Goran Krajacic
Lets say i have 10.000 rows in a table and im searching for only one record(one row). Which one is faster: SELECT ... LIMIT 1 or just SELECT .. ?

MLM database design

2001-07-28 Thread Goran Krajacic
Has anyone done a db for a multi-level compensation structure? I'm talking about a company that is MLM or a multi-level marketing network. Where distributors sign up under other distributors and the downline can go down many levels(but limited levels!). The important issue is how long would it