Microsoft Sql Server

Please forgive me if this has already been answered, I have read the FAQ, but it’s hard to get an exact understanding on this. I did read where it looks like Piwik use zend_db? Would that mean that the SQL that is generated is abstracted to this layer? Or is the SQL (dynamic) tightly coupled and scattered throughout the code with MySql syntax?

The reason I’m asking is because we use SQL Server 2008 and have our DB Servers setup to handle a large number of transactions. But since Piwik is constrained to only run on MySql I feel that I will not be able to get the performance out of it, because they won’t let me setup MySql on our DataBase servers. I could set it up on the webserver I was going to install Piwik on, but I’m not sure it will perform enough. We currently have over 45 million page views a month with a couple of our site, so performance would be a factor. If I could figure out from the source code, how the SQL Statements are built and where the connections are taking place I might be able to change it use a Microsoft SQL Server 2008 database.

Thanks style_emoticons/<#EMO_DIR#>/smile.gif

We use some components of Zend_Db but we still have MySQL-isms. Piwik officially supports only MySQL. We’ve done some abstraction to support other drivers but there’s still work to be done if anyone wants PostgreSQL, MSSQL, Oracle, etc.

What kinda of work?

Off the top-of-my-head, a non-exhaustive list:

  1. move the DDL (in core/Piwik.php) into db-specific scripts
  2. MySQL function call to CRC32()
  3. sequence number on archive id
  4. ON DUPLICATE
  5. queries that use quote(), or manually use ', ", or `
  6. queries that use IN (…) on an imploded array
  7. add db-specific unit tests

[quote=vipsoft @ Apr 21 2010, 02:15 PM]Off the top-of-my-head, a non-exhaustive list:

  1. move the DDL (in core/Piwik.php) into db-specific scripts
  2. MySQL function call to CRC32()
  3. sequence number on archive id
  4. ON DUPLICATE
  5. queries that use quote(), or manually use ', ", or `
  6. queries that use IN (…) on an imploded array
  7. add db-specific unit tests[/quote]

I’ve never done php development, but I’ have done quite of bit of classic asp, asp.net, C#, … C++ with Oracle, Sql Server. So php shouldn’t be too hard? should it? (famous last words) style_emoticons/<#EMO_DIR#>/smile.gif I’ll try and setup a development env. and see if I can contribute some time. I’ve pulled the latest source code via tortoise and have a working copy setup. I’ll try to follow the article on setting up a php dev env. It’s a little dated, but I think I can find all the latest tools.