Re: Vexing permissions issue with partitioned CREATE TABLE

2008-12-05 Thread Florin Andrei

Brad Heintz wrote:


I've googled extensively, searched the list archives, and exhausted every
other avenue I could think of before posting to the list, but am no closer
to an answer.  Does anyone have any ideas?   Have I missed something in the
docs?


SELinux?

--
Florin Andrei

http://florin.myip.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: IIS, ASP, MySQL (was: database pooling problem)

2005-04-06 Thread Florin Andrei
On Wed, 2005-04-06 at 09:55 -0500, Robert Citek wrote:
 
 Is using MyODBC the accepted way to connect to a MySQL database from 
 within an ASP/VBScript page?  Or is there some other way?  For example, 
 PHP has a connector that can directly connect to a MySQL database.

I believe it's the only one currently maintained.

-- 
Florin Andrei

http://florin.myip.org/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: power loss scenario

2005-03-30 Thread Florin Andrei
On Wed, 30 Mar 2005 08:49:13 -0500, Brent Baisley [EMAIL PROTECTED] wrote:
 Wow, you are asking a lot, especially since an inexpensive UPS could be
 had for less than $50. You don't need one to keep the system up for a
 long time, just long enough for writes to finish. A few minutes should
 be plenty.

I know it's weird. It's not about technical issues or money. It's just
one of those different situations.

 Whatever file system you use, I would most definitely use journaling.
 First and foremost you need the system in a good state, then the DB.

There are two disks in the system, one with the OS, the other with the database.
The OS drive is, i believe, almost fail-proof: the write cache is
turned off, plus it's Ext3 with data=journal. Those settings bring a
major performance hit, but that's ok on the OS drive, which is
sparsely used.
But i cannot force the same settings on the DB drive without risking
the performance to drop through the floor. Well, maybe data=journal (i
have to experiment).

 Journaling in the file system will also help in keeping the database
 intact. Raw partitions would buy you so little performance gain, it's
 really not worth the hassle.

Wouldn't raw partitions fail less often if the power is yanked, just
because there are fewer components to fail?
I mean, if the database is on top of a FS, it's the database and the
FS that can fail. On a raw partition, it's just the database.
Or am i missing something?

-- 
Florin Andrei

http://florin.myip.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



speed of 3.23 vs 4.1 for logging server

2005-03-29 Thread Florin Andrei
Fedora Core 3, which is the Linux distribution that i'm using, is still
shipping with 3.23.58
The beta (test) version of Fedora 4 has mysql-4.1.10. However, FC4 is
scheduled to go live on June 6th. But i need a MySQL server now.

This server will be mostly used for logging (think: syslog logging to
SQL), so most of the time will just receive INSERTs on a permanent basis
from a couple of sources, to a few tables (just a handful, all of them
in two databases) that will be rotated periodically (all tables will be
append-only - when they're too big, they're just rotated away and the
very old ones are deleted when disk usage hits a threshold).
Every now and then, a user or two will perform searches through the
logs.

Is there a big performance difference between 3.23 and 4.1 in such a
case?
I prefer to just use whatever's offered in the current distribution
because i don't have much time to spend tweaking the system (upgrade
MySQL, recompile PHP, verify SELinux policies, etc.), but if there is a
really big performance difference, i may do the effort to upgrade MySQL
to the one offered in FC4-test.

-- 
Florin Andrei

http://florin.myip.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: upgrading mysql on RH fedora core 3

2005-03-29 Thread Florin Andrei
On Tue, 29 Mar 2005 19:28:56 -0800, bruce [EMAIL PROTECTED] wrote:
 
 we're trying to install mysql/mysql-server (4.1.10a-1.i386) and are running
 into some serious problems. we had mysql/server (3.23.52-3.i386) running,
 but needed to go to the higher version...

I was about to attempt the same thing. My thinking was to grab the
mysql src.rpm from Fedora Core 4 test 1 and rebuild it on FC3:

rpmbuild --rebuild mysql...src.rpm

Please try that and see how it goes.

 also, this has to be running with apache/php/perl/etc...

My feeling is that apache does not need to be rebuilt.
PHP certainly does, from src.rpm, after the new mysql is installed
(including mysql-devel). I am not sure whether it would just work to
grab the PHP src.rpm from FC3 updates and rebuild it on top of the new
mysql, or get the PHP src.rpm from FC4-test and rebuild.
Perl is in the same situation, but it's probably even more complex.

If i were you, i would probably post on the fedora-test mailing list
and ask the same question.

Anyway, good luck and let us know how it goes.

-- 
Florin Andrei

http://florin.myip.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: upgrading mysql on RH fedora core 3

2005-03-29 Thread Florin Andrei
On Tue, 29 Mar 2005 20:39:54 -0800, Florin Andrei
[EMAIL PROTECTED] wrote:
 On Tue, 29 Mar 2005 19:28:56 -0800, bruce [EMAIL PROTECTED] wrote:
 
  we're trying to install mysql/mysql-server (4.1.10a-1.i386) and are running
  into some serious problems. we had mysql/server (3.23.52-3.i386) running,
  but needed to go to the higher version...
 
 I was about to attempt the same thing. My thinking was to grab the
 mysql src.rpm from Fedora Core 4 test 1 and rebuild it on FC3:
 
 rpmbuild --rebuild mysql...src.rpm

Hey, whaddayaknow, it worked! :-) I just rebuilt the FC4t1 mysql src.rpm on FC3.

It's just that i cannot try it, not today. I'll see if i can play with
it tomorrow. Ideally, i'd like to get a spare system, nuke all it's
content, do a fresh minimal install of FC3 (unselect all package
categories except development), apply all updates (yum update),
rebuild mysql-4, install it, then play with Perl and PHP and see if
they need to be rebuilt as well (hopefully not).

-- 
Florin Andrei

http://florin.myip.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



power loss scenario

2005-03-29 Thread Florin Andrei
Again the logging server i mentioned before: it's like syslog logging
to a DB, lots of INSERTs, perhaps a few SELECTs every now and then,
the tables are append-only and are rotated about once a day.
For reasons that i am not going to discuss here, the machine has no
uninterruptible power supply. Therefore, if the power goes down, bad
things might happen to the database.
Also, i don't have money for funky solutions such as solid-state
disks. In fact, the disks will most likely be IDE (not even SCSI).

What are the techniques that work best in such a situation to increase
the chances for the database to survive a crash in a consistent state?
Loosing a few recent INSERTs is not a problem (since some data will
not be logged anyway while the server is down), but the DB in an
inconsistent state is a big problem (the system has to boot up again
unattended).

I do not want to do such extreme things like turning off the write
cache on the disk, because that would probably kill the performance.
But how about Ext3 with data=journal?
Using InnoDB would be better than MyISAM?
How about raw partitions?
Any other tips?

-- 
Florin Andrei

http://florin.myip.org/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



performance with many clients

2002-09-05 Thread Florin Andrei

(description of the situation first, question at the end)

Using:
- MySQL-3.23.49a
- Linux Red Hat 7.2 (SGI XFS patch)
- 2xPIII/700, 1GB RAM, 4x36GB SCSI RAID5, Mylex DAC960

The system runs a custom syslogd (
http://sourceforge.net/projects/msyslog/ ) that logs the messages in
MySQL instead of text files. At this moment, 30 systems send logs over
the network to this server.
Because the way i configured msyslog, i have one connection from
msyslogd to MySQL for each host, logging to its own separate database
(long story, don't ask).

So, basically, i have 30 client connections doing a lot of INSERT
DELAYED's, each one in its own database.

The machine has load issues. The idle CPU is around 25%, but load
average is around 1.00 but sometimes it goes beyond 2.00, and system
CPU usage (kernel) is around 20..50%. The user CPU usage is very low
(10%).
I cannot let it go beyond 2.00 load average, because then i risk losing
syslog messages. I'm trying to reduce the load average.

It's not the disk I/O or network I/O, i checked that with vmstat. But
the system is doing a lot of context switches: 1000 / sec, sometimes
more.
So, i think the machine spends too much time just with switching context
between threads.

My question is: what's the reasonable limit of the number of client
connections to a MySQL server?
Am i going to get any benefit from upgrading to MySQL-4.0?

-- 
Florin Andrei

The world is full of bad security systems designed by people
who read 'Applied Cryptography'. - Bruce Schneier


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Apache logging to MySQL

2002-08-30 Thread Florin Andrei

On Fri, 2002-08-30 at 10:04, Chad Arimura wrote:
 
 I'm considering inserting all of our web access information directly to a
 mysql table.  We have a medium transaction rate, about 4.5 per second but at
 peak it can get a lot higher.  We get about 140,000 hits per day on average
 for 1,500 visitors/day.
 
 I've never doubted MySQL's speed and reliability for a second (and
 definitely want to give thanks to all developers).  BUT, I'm a little wary
 about adding this logging feature, which would add about 140k insert
 statements per day.  This number will eventually grow to at least double or
 triple that.
 
 Would anyone advise just doing a batch insert every night of the entire
 daily log?  Obviously I would prefer the real-time option if overhead is
 minimal...

Real-time should be fine. I'm using MySQL to collect syslog stuff, and i
get _a_lot_ of messages; 30/second is not unusual, although i don't have
exact numbers.
You only need a reasonably fast CPU (i'm not saying get the latest one,
just don't use an old one) and a reasonably fast disk I/O.
And, yeah, don't index what you don't need to. ;-)

-- 
Florin Andrei

Cryptophiles had been so enraptured by the possibilities
of uncrackable ciphers that they forgot they were living in a world
in which people can't program VCRs. - Bruce Schneier


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL 4.0 and LIKE %string%

2002-08-29 Thread Florin Andrei

Quote from the How MySQL Uses Indexes document:


MySQL 4.0 does another optimisation on LIKE. If you use ... LIKE
%string% and string is longer than 3 characters, MySQL will use the
Turbo Boyer-Moore algorithm to initialise the pattern for the string and
then use this pattern to perform the search quicker.


Does this optimisation depend on the existence of an index on that
column, or is it used even without an index?

Either way, how big is the speed improvement?

-- 
Florin Andrei

Cryptophiles had been so enraptured by the possibilities
of uncrackable ciphers that they forgot they were living in a world
in which people can't program VCRs. - Bruce Schneier


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




please modify init.d script

2002-06-21 Thread Florin Andrei

The init.d script provided with the MySQL RPMs has a problem: if an
application depends on MySQL (say, it's a daemon logging some data in
MySQL), and this application starts right after MySQL, it usually fails.

The reason is, when the init.d/mysql script returs, usually MySQL is not
fully running, but it's still initializing some stuff. If the other
application has its init.d script right after, it fails to connect to
the database, because the database does not run yet. Depending on the
application, then the application itself might fail to start altogether.

Please add a delay (like sleep 2 or something like that) to the start
function in the init.d script. Or modify the start function to not
return until MySQL has booted up properly. Like:

while [it didn't started yet]; do
sleep 1
done

-- 
Florin Andrei

You can get excited about just any subject if you study it enough.
It's the deep knowledge that makes a topic interesting. - Larry McVoy


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: please modify init.d script

2002-06-21 Thread Florin Andrei

On Fri, 2002-06-21 at 12:09, Gerald Clark wrote:
 Or better yet,
 add a sleep 2 to the beginning of the init.d program you are starting 
 that expects to connect to mysql.
 
 Why slow down the booting for everybody when some other daemon that 
 expects to connect to mysql
 can not handle a failed connect properly?

Because you have to do that for every service that uses MySQL (that
means modifying lots of things) when, in fact, the problem is in MySQL's
script (and it could be fixed modifying that one script).

I don't quite understand why one would care so much about a couple of
seconds of boot time? It's not like you reboot the production servers
every day.
And, BTW, we're talking about Unix, right? Not Windows RebootME. ;-)

I would be much more concerned about the reliability of the boot-up
process, than with some unrealistic mine boots up one milisecond faster
that yours.
Reliability is _much_ more important than one second added to boot-up
time. My customers wouldn't care too much if my servers came back one
second later, but they would care very much if the servers came back
without running some critical services.

This is about playing by the rules too: when the init.d script returns,
and it reports OK or success, or whatever, then it should tell the
truth.
Right now, mysql's init.d script is lying; it reports success, while
MySQL didn't in fact finished the boot-up process. It is conceivable
that it might actually fail later, because it still has a few things to
do after the script already returned control (and happily reported
success).

This rule is observed by the init.d scripts of most of the other
daemons. For example, Squid's script does not return control when
shutting down the daemon until the daemon really closed all
filedescriptors; on a very busy caching proxy, that might take one
minute to complete (and i've seen even longer times occasionally)! But
hey, one has to clean up its own mess, right?
If you don't do that (wait for the proxy to properly terminate
connections/flushing buffers), the init hierarchy would end up
SIGKILLing squid at the end, with the risk of terminating active
filedescriptors, etc.
You only have to SIGKILL it if indeed it takes an exagerated time to
shut down, and that means there's a problem hidden somewhere, and now
you are aware of it and you can fix it.

-- 
Florin Andrei

You can get excited about just any subject if you study it enough.
It's the deep knowledge that makes a topic interesting. - Larry McVoy


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RENAME TABLE and locking

2002-05-15 Thread Florin Andrei

I'm using MySQL-3.23.49a

I use MySQL to replace plain text log files. The logging happens in a
table named current.
Every midnight, at 00:00:00, i perform a table rotation with this
command from a cron job:

CREATE TABLE new 
RENAME TABLE current TO $date, new TO current

where $date is yesterday's date.

The problem is, it's impossible to prevent today's messages from
creeping into the old, rotated table. The reason is, there's always a
very short delay before the rotation is performed, and some of today's
messages always get into current before rotating it.
I wonder if i can use locking to correct this problem.

I mean: i create table new, lock it, perform the rotation (so now
new is current, while the old current is $date), flush today's
record from $date into current, then unlock current.
Will it work this way?

I'm not sure what happens to locking after RENAME; if i lock new and
RENAME it to current, will the lock be inherited by current?

-- 
Florin Andrei

You know you're in trouble when packet floods are competing to flood
you.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




please update the RPM packages

2002-02-13 Thread Florin Andrei

Guys,

A while ago i asked you to modify the MySQL RPM package so that it will
also provide mysql

-- 
Florin Andrei

U is for Universe, everything there is. Possibly a large
computer simulation. - Alphabetica Cyberia


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




please update the RPM packages

2002-02-13 Thread Florin Andrei

(please ignore my previous message, it was sent by mistake)

A while ago i asked you to modify the MySQL RPM package so that it will
also provide mysql, not only MySQL, so that some RPM dependencies
on some distributions will be happy.
You did changed the provides option, it works fine, thank you.

But now i have the same problem with MySQL-devel. In fact, i'm asking
you to make appropriate changes to all MySQL RPM packages, so that they
will provide mysql-*, not only MySQL-*.

The changes should be trivial, just as they were for the main package.

Regards,

-- 
Florin Andrei

U is for Universe, everything there is. Possibly a large
computer simulation. - Alphabetica Cyberia


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Squid logging

2002-01-29 Thread Florin Andrei

Guys,

I'm talking to the people from squid-dev mailing list about making Squid
log directly into MySQL.
Because Squid is a single-process application that does everything in
one select() loop, there are worried about blocking sockets: if you open
a socket from Squid to MySQL you don't want that socket to block, not
even for a second.
The long-term approach (that will make it into future versions of Squid)
is to use some sort of an external helper to consolidate all logging
stuff. But for the moment, if i want SQL logging in Squid-2.4, there's
this issue of blocking/non-blocking.

What is the answer to that (see message below)?

-Forwarded Message-

From: Robert Collins [EMAIL PROTECTED]
To: Florin Andrei [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: MySQL logging
Date: 29 Jan 2002 19:44:47 +1100


- Original Message -
From: Florin Andrei [EMAIL PROTECTED]
If the socket is blocking, the call may still block. Does INSERT
DELAYED
work with non-blocking sockets?
  
   I have no idea. :o)
 
  Do it as an external process.

 Actually, INSERT DELAYED is designed to return success at once to
the
 client, no matter what happens; mysqld will cache the request and
 actually make it happen when enough resources are available (at once
if
 it's not too busy, later if other requests are eating up CPU and I/O).
 This option was specifically created for clients that cannot wait for
 busy servers to swallow their insert requests.
 That being said, is this still supposed to be an issue? (this is not
 very clear to me, that's why i'm asking)

Imagine the following scenario:
squid logs a lot of info.
the local socket buffer is filled, and the LAN to the SQL server is a
little congested (due to other traffic).
squid inserts yet another request, and squid blocks for 1/2 second.

That's a 1/2 second with no activity at all.

So, yes, it is an issue UNLESS the socket is able to be set non-blocking
(perhaps the mysql folk can answer this?).

Rob



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: optimize for SELECTs on multiple large tables

2002-01-25 Thread Florin Andrei

On Wed, 2001-12-05 at 16:33, Arjen G. Lentz wrote:
 
 - Original Message -
 From: Florin Andrei [EMAIL PROTECTED]
 
  SELECT event.cid, iphdr.ip_src, iphdr.ip_dst, tcphdr.tcp_dport FROM
  event, iphdr, tcphdr WHERE event.cid = iphdr.cid AND event.cid =
  tcphdr.cid AND tcphdr.tcp_flags = '2';
 
 So, MySQL actually has no index to work with.
 So, you will want to add an index on cid alone, for the event and iphdr tables
 (tcphdr table doesn't matter since your select will use the tcp_flags index to
 limit down the first part of the join, as described above).
 Making sense?

Yes. Thank you.

Now, suppose i don't know how my SELECTs will look like. Suppose i
collect general purpose data, and i will devise my data mining schemes
later. Therefore, i guess it may make sense to add indexes for almost
all columns that might be used to search for data.

But then, an index will slow down the INSERT speed, right?

What's the performance penalty for INSERTs when i have indexes for
almost all columns? (the tables have 5...10 columns, all of them
integers of one sort or the other) It will slow down INSERTs 2 times? 10
times? More?

-- 
Florin Andrei

The security of any corporate network is inversely proportional
to the number of systems administrators on the network. -
- Petreley's law of sysadmins


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




optimize for SELECTs on multiple large tables

2001-12-05 Thread Florin Andrei

I have this SQL query:

SELECT tbl1.col1, tbl2.col2 FROM tbl1, tbl2 WHERE \
  tbl1.col3 = tbl2.col4 AND tbl1.col5 = '123';

(well, maybe there are more than two columns selected, and maybe a
little more than two tables, but you got the idea...)
The tables have 5...10 columns, every column is an integer type, and
they have A LOT of rows (the total amount of space occupied by those
tables on disk is 2 GB).

The problem is, MySQL-3.23.46 takes forever to return from SELECT (i let
it run over night, in the morning i still didn't got any results, so i
killed the query).

Splitting the big tables into small ones will not help, because i still
want to be able to run the SELECT across _all_ data (and it's not
convenient for my application).
I cannot modify the structure of the tables (the application requires a
certain table structure).

So i wonder if there's any way to optimise MySQL so that i will be able
to actually do a SELECT on those tables.
Maybe tweak parameters like join_buffer_size? table_cache? Anyone has
some experience with these?... What's the best way to optimize MySQL for
running SELECTs on multiple large tables?

This is the only thing that keeps me from deploying MySQL in production
now.

(Not to start a flamewar, just to acknowledge a fact: i ran the same SQL
statement, with the same data set, on some other SQL servers, and i
got the result in 5 minutes, as opposed to MySQL still giving back
nothing after several hours. But i want to use MySQL because i need
something that can do INSERTs very fast, and MySQL is very, very good at
this. The only problem is, it is slow when it comes to SELECTs on
multiple large tables, and i'm not sure how to optimize it for that.)

-- 
Florin Andrei

Engineering does not require science. - Linus Torvalds


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: optimize for SELECTs on multiple large tables

2001-12-05 Thread Florin Andrei

On Wed, 2001-12-05 at 15:01, Robert Alexander wrote:
 At 14:45 -0800 2001/12/05, Florin Andrei wrote:
 The problem is, MySQL-3.23.46 takes forever to return from SELECT (i let
 it run over night, in the morning i still didn't got any results, so i
 killed the query).
 
   the hardware and OS

SGI 1200 (dual PIII/800, 768MB RAM, SCSI)
Linux Red Hat 7.2

   the actual query (formatted to be readable, please : )

SELECT event.cid, iphdr.ip_src, iphdr.ip_dst, tcphdr.tcp_dport FROM
event, iphdr, tcphdr WHERE event.cid = iphdr.cid AND event.cid =
tcphdr.cid AND tcphdr.tcp_flags = '2';

When i ran the query, it just sat there, doing nothing: no disk
activity, CPU usage was 0%... As i said, after several hours i had to
kill it.

This is actually a database for Snort; i'm sniffing a network and
recording relevant info about IP packets into the database.

The event table contains only the event id (cid) and the timestamp for
the IP packet.
The iphdr table contains the source- and destination- IP for the packet
(identified by cid).
The tcphdr table contains TCP-specific info for the packet (identified
by cid).

I need to extract the source- and destination- IP address for certain
packets (TCP with SYN flag set). And maybe ORDER BY iphdr.ip_src, but
that's not mandatory.

The actual table structure is this:

CREATE TABLE event  ( sid INT  UNSIGNED NOT NULL,
  cid INT  UNSIGNED NOT NULL,
  signature   INT  UNSIGNED NOT NULL, 
  timestampDATETIME NOT NULL,
  PRIMARY KEY (sid,cid),
  INDEX   sig (signature),
  INDEX   time (timestamp));

CREATE TABLE iphdr  ( sid INT  UNSIGNED NOT NULL,
  cid INT  UNSIGNED NOT NULL,
  ip_src  INT  UNSIGNED NOT NULL,
  ip_dst  INT  UNSIGNED NOT NULL,
  ip_ver  TINYINT  UNSIGNED,
  ip_hlen TINYINT  UNSIGNED,
  ip_tos  TINYINT  UNSIGNED,
  ip_len  SMALLINT UNSIGNED,
  ip_id   SMALLINT UNSIGNED,
  ip_flagsTINYINT  UNSIGNED,
  ip_off  SMALLINT UNSIGNED,
  ip_ttl  TINYINT  UNSIGNED,
  ip_protoTINYINT  UNSIGNED NOT NULL,
  ip_csum SMALLINT UNSIGNED,
  PRIMARY KEY (sid,cid),
  INDEX ip_src (ip_src),
  INDEX ip_dst (ip_dst));

CREATE TABLE tcphdr(  sid INT  UNSIGNED NOT NULL,
  cid INT  UNSIGNED NOT NULL,
  tcp_sport   SMALLINT UNSIGNED NOT NULL,
  tcp_dport   SMALLINT UNSIGNED NOT NULL,
  tcp_seq INT  UNSIGNED,
  tcp_ack INT  UNSIGNED,
  tcp_off TINYINT  UNSIGNED,
  tcp_res TINYINT  UNSIGNED,
  tcp_flags   TINYINT  UNSIGNED NOT NULL,
  tcp_win SMALLINT UNSIGNED,
  tcp_csumSMALLINT UNSIGNED,
  tcp_urp SMALLINT UNSIGNED,
  PRIMARY KEY (sid,cid),
  INDEX   tcp_sport (tcp_sport),
  INDEX   tcp_dport (tcp_dport),
  INDEX   tcp_flags (tcp_flags));

(it's the typical Snort database, and i don't want to change it, because
many applications related to Snort expect it to be this way)

-- 
Florin Andrei

Engineering does not require science. - Linus Torvalds


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: What's the best os?

2001-06-01 Thread Florin Andrei

On 01 Jun 2001 00:30:20 -0400, David Freeman wrote:
 
 My question is, what is the best OS for a heavy usage, multi-processor
 mysql database driven web site.  We could use almost anything, but we
 would prefer to use a free OS such as freebsd or Linux based OS.

Some people reported better performance for MySQL on Linux than on
Solaris, using the same hardware (Sparc).
While i don't think there's much difference between Linux and FreeBSD, i
would expect Linux-2.4 to handle SMP and threads a little bit better
than FreeBSD. But this is close to religious war...

I would reccomend Linux with kernel 2.4.

You should use a journalised filesystem, of course.
Now, while ReiserFS does better when it comes to handling lots of small
files, XFS is better at ensuring high I/O rates, especially for
simultaneous access to large files in heavy-loaded SMP environments,
because that's what it was designed for.
So, it's better suited for databases, such as MySQL.

XFS-1.0 is already available for Linux (kernel 2.4), and it's fully
stable. You can download it from here:

http://oss.sgi.com/projects/xfs/

Or, if you prefer, get an ISO image containing a modified Red Hat 7.1
kit, able to install itself directly on XFS, from here:

http://oss.sgi.com/projects/xfs/1.0_installer.html

-- 
Florin Andrei


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL 3.23.38 released

2001-05-16 Thread Florin Andrei

On 16 May 2001 13:40:55 +0300, Sinisa Milivojevic wrote:
 Regarding the fact that 2.96 can build working binaries, that is good
 news, but before we try it ourselves, could you please run all
 mysql-test programs plus sql-bench. See if it will pass them all.

I tried to install MySQL-bench, but it requires MySQL-DBI-perl-bin
Searched for the latter on mysql.com - nothing.
Searched on rpmfind.net, found Mysql-DBI-perl-bin, it doesn't work
because MySQL-bench requires MySQL-blah not Mysql-blah (capital
letters).
Searched for Mysql-DBI-perl-bin.blah.src.rpm to rebuild the package with
different name... no success.

Now, that's silly. Where can i find the required package?
What is the reason that you provide the MySQL-bench package if it cannot
be installed?

-- 
Florin Andrei

All operating systems suck.
Linux just sucks less - an MIT guy


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL 3.23.38 released

2001-05-16 Thread Florin Andrei

On 16 May 2001 13:40:55 +0300, Sinisa Milivojevic wrote:
 
 Regarding the fact that 2.96 can build working binaries, that is good
 news, but before we try it ourselves, could you please run all
 mysql-test programs plus sql-bench. See if it will pass them all.

Ok, finally i installed MySQL-bench with --nodeps (which is bad!).

But, while trying to figure out how to use your test programs, i
realised that they are poorly documented.
I really don't have the time to dig into the scripts for information
that should have been in the docs. Sorry.
I think it's better to leave it to you to test the gcc-2.96 binaries...

Regards,

-- 
Florin Andrei

All operating systems suck.
Linux just sucks less - an MIT guy


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL 3.23.38 released

2001-05-15 Thread Florin Andrei

On 15 May 2001 13:21:12 +0300, Sinisa Milivojevic wrote:
 
 The reason why you are having problems in building from source is that
 you are most probably using gcc 2.96, which is simply broken.

Will you accept further patches to the spec file that will try to
autodetect the compiler and make use of a better one if available?
Of course, provided that the autodetection puts safety above everything
else, so it will NOT screw up the compilation on other platforms. ;-)
I'm willing to take the time and figure out a solution (detect the buggy
2.96, see if 2.95 a.k.a. kgcc is available, and use the latter
instead)

-- 
Florin Andrei

database, we have a problem


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL 3.23.38 released

2001-05-14 Thread Florin Andrei

On 12 May 2001 00:51:11 +0300, Michael Widenius wrote:
 
 You can now find MySQL-Max (MySQL binaries with support for the above
 table types) for most supported platforms at
 http://www.mysql.com/downloads/mysql-max-3.23.html

That's great news!!!
Congratulations, guys!

Now the problems: :-)

Everything i say here is valid for Linux Red Hat 7.0 (with all bugfixes
applied) running on a dual-PIII.

1. If i download the RPM binaries from mysql.com and install them,
everything's fine. I can login into the database and to all kind of fun
things:

##
[florin@stantz florin]$ mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.38-Max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer

mysql show databases;
+--+
| Database |
+--+
| mysql|
| test |
+--+
2 rows in set (0.00 sec)

mysql exit;
Bye
[florin@stantz florin]$
##

But if i download the src.rpm, rebuild it and install the resulted rpm
binaries, many simple SQL commands do not work:

###
[root@stantz /root]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.38-Max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer

mysql show databases;
+--+
| Database |
+--+
|  |
|  |
|  |
|  |
|  |
|  |
|  |
+--+
7 rows in set (0.00 sec)

mysql exit;
Bye
[root@stantz /root]#


I had to uninstall my binaries and reinstall the downloaded ones to make
it work again.

2. You may ask why i should rebuild the src.rpm when you already
provided i386.rpm's that work?
Well, the problem is, there's an incompatibility between your binaries
and Red Hat. See here:

#
[root@stantz RPMS]# rpm -Uvh php-mysql-4.0.4pl1-9.i386.rpm 
error: failed dependencies:
mysql is needed by php-mysql-4.0.4pl1-9
[root@stantz RPMS]#
#

Apparently, your packages provide a different set of rpm-provides than
the ones from Red Hat. So then, even if i have your MySQL RPMs
installed, the packages from Red Hat do not see them and refuse to
install.
My quick fix was to uninstall your binaries, download the src.rpm,
rebuild it and install the resulted RPMs. But then, the mysql binaries
do not work (see previous problem).
What next? :-/

The patch for the .spec file that makes your binaries play well together
with the Red Hat collection :-P is attached to this message. It's just a
microscopic modification to the Provides line, and it shouldn't do any
harm. Please, please include it in the official mysql rpms!

Best regards, and keep up the good work!

-- 
Florin Andrei

Remember, son:
if you never try, you never fail - Homer Simpson


--- mysql-3.23.38.spec.orig Wed May  9 13:56:54 2001
+++ mysql-3.23.38.spec  Mon May 14 16:09:46 2001
@@ -18,7 +18,7 @@
 URL:   http://www.mysql.com/
 Packager:  David Axmark [EMAIL PROTECTED]
 Vendor:MySQL AB
-Provides:  msqlormysql MySQL-server
+Provides:  msqlormysql MySQL-server mysql
 Obsoletes: mysql
 
 # Think about what you use here since the first step is to



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: red hat 7.1 rpm --rebuild error

2001-04-30 Thread Florin Andrei


I try to rpm --rebuild the src.rpm for 3.23.37 on a Linux Red Hat 7.1
system, but i get this error:

checking for gcc... egcs
checking whether the C compiler (egcs  -O3  ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
error: Bad exit status from /var/tmp/rpm-tmp.21106 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.21106 (%build)
[root@two /root]#

However, the compiler is installed, and it works (i have some other
programs build on that system).

anti-filter stuff
database,sql,query :-P
/anti-filter

-- 
Florin Andrei

Bloat is not about being big. Bloat is about being slow and stupid and
not
realizing that it's because of design mistakes. - Linus Torvalds





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL binary with BerkeleyDB

2001-04-10 Thread Florin Andrei


I saw that MySQL now includes BDB in the source tree.
When will be released a binary package with BDB and transactions support
already compiled? I'm interested in the Linux, Irix and Windows
versions.

-- 
Florin Andrei


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




lots of clients

2001-04-03 Thread Florin Andrei


What is the maximum number of connections MySQL can handle?

I would like to use MySQL as a logging server, for some 500 machines,
but i'm not sure it is able to handle so many simultaneous connections
(the clients will do only INSERT or INSERT DELAYED).

-- 
Florin Andrei


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: lots of clients

2001-04-03 Thread Florin Andrei

On 03 Apr 2001 16:49:36 -0700, Eric Fitzgerald wrote:
 Depends on your hardware...
 
 500 machines of logging, how many entries per second?

I'm not sure, but i believe most of those machines will not send more
than a couple of events per second. Some of them (but not too many) will
surely send more.

 I've seen people
 report their MySQL installs doing hundreds or thousands of queries per
 second, and not even phasing the machine.

Ok, this sounds encouraging. ;-)

-- 
Florin Andrei


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




insert delayed

2001-03-29 Thread Florin Andrei


What happens if i use INSERT DELAYED and the client sends a lot of
messages, much more that mysql is able to handle?
(like when you log to a sql database, and you got lots of messages)

-- 
Florin Andrei


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php