Browse
 
Tools Add
Rss Categories
-->

Ubuntu VPS - Desktop (LXDE) Installation and VNC

Reference Number: AA-04694 Created: 2013-01-04 02:00 Last Updated: 2013-01-07 14:32 0 Rating/ Voters

Installing LXDE desktop environment and VNC server

This guide will walk you through the steps necessary to install the LXDE desktop as well as the vnc4server package for remote desktop access on your Ubuntu 12 VPS. For this guide we will be using a one user VNC set up, though adding additional users will also be explained.

NOTE: This guide uses Ubuntu version 12.04.1 LTS so there may be extra steps for different versions. Comments in this article will be preceded by a hash tag (#).

Recommended VPS Specifications: Minimum 1 GB of RAM, 20 GB HDD

To begin, SSH into your VPS using the root username and password.

Installing the LXDE environment

# Using apt-get, first update your system packages to the latest versions before we proceed

apt-get upgrade

# Use apt-get to install LXDE and necessary font packages

apt-get install lxde xfonts-100dpi xfonts-100dpi-transcoded xfonts-75dpi xfonts-75dpi-transcoded xfonts-base

Installing and Configuring vnc4server

# Using apt-get install vnc4server and optionally a command-line text editor, nano, which we will be using later on

apt-get install vnc4server nano

# Now we need to add a user that the desktop will be running under as well as create a password for it. Please choose a strong password of minimum 8 characters in length using uppercase, lowercase, numbers and symbols.

adduser vncuser

# After adding the user, we will need to create and edit the VNC server configuration to specify which user will be able to connect as well as what screen resolution they will use. You can change the screen resolution to any value. Common values are 1024x768 1680x1050 1920x1080. You may want to reduce these values slightly less than your local PC's screen resolution (Example: if using 1920x1080 at home, try setting your VNC resolution to 1900x960).

mkdir -p /etc/vncserver
touch /etc/vncserver/vncservers.conf
nano /etc/vncserver/vncservers.conf

# Add the following lines to the file:

VNCSERVERS="1:vncuser"
VNCSERVERARGS[1]="-geometry 1024x768"

# Since we'll want the VNC server to start on boot, we'll need to create a service for it. In these next steps we'll be creating a service script for this purpose. Simply copy and paste the code below into the file

touch /etc/init.d/vncserver
chmod +x /etc/init.d/vncserver
nano /etc/init.d/vncserver

# Contents of /etc/init.d/vncserver

#!/bin/bash
### BEGIN INIT INFO
# Provides:          vncserver
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: vnc server
# Description:
#
### END INIT INFO

unset VNCSERVERARGS
VNCSERVERS=""
[ -f /etc/vncserver/vncservers.conf ] && . /etc/vncserver/vncservers.conf
prog=$"VNC server"

start() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Starting $prog: "
 ulimit -S -c 0 >/dev/null 2>&1
 RETVAL=0
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 DISP="${display%%:*}"
 export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
 su ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
 fi
 done
}

stop() {
 . /lib/lsb/init-functions
 REQ_USER=$2
 echo -n $"Shutting down VNCServer: "
 for display in ${VNCSERVERS}
 do
 export USER="${display##*:}"
 if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
 echo -n "${display} "
 unset BASH_ENV ENV
 export USER="${display##*:}"
 su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
 fi
 done
 echo -e "\n"
 echo "VNCServer Stopped"
}

case "$1" in
start)
start $@
;;
stop)
stop $@
;;
restart|reload)
stop $@
sleep 3
start $@
;;
condrestart)
if [ -f /var/lock/subsys/vncserver ]; then
stop $@
sleep 3
start $@
fi
;;
status)
status Xvnc
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

# Register the service

update-rc.d vncserver defaults 99

# Now we must create a VNC connection password for our user. First we will use the su command to login to the user's shell and use the vncpasswd to set the password.

su vncuser
vncpasswd

# We need to start then stop the server to generate a configuration file

vncserver :1; vncserver -kill :1

# After we've generated the configuration file, we must edit it so that LXDE is loaded when we connect

nano ~/.vnc/xstartup

# Edit the file or replace its contents so that they look like the code below and save

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
lxsession -s LXDE &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &

# Drop back to root shell

exit

# Start the VNC service

service vncserver start

Connecting to your VNC server from your local PC

To connect to your newly operational server, you will need a VNC client. For a client I would recommend the TightVNC client. Alternatively you can use a more basic client like TigerVNC. To obtain these visit these links:

TightVNC Client for Windows: http://www.tightvnc.com/download.php

TigerVNC Client for Windows: http://sourceforge.net/projects/tigervnc/files/latest/download

When connecting using this software, you will need to specify the port for connecting. If using the configuration above this port will be 5901. In the server field of the client you can enter the port like this <ServerIP>:5901

Adding Additional VNC Users

Adding a new VNC user that is able to connect to the server follows much the same process as above. First we would add a new user and set a password then edit our server configuration, set a VNC user password and restart the server.

# Add new user/change password

adduser vncuser2

# Open VNC server configuration in nano

nano /etc/vncserver/vncservers.conf

# Edit the VNCSERVERS line to look like this:

VNCSERVERS="1:vncuser 2:vncuser2" 

# Add the following line to the end of the config file. Notice here that we've changed the username as well as the 1 to a 2 specifying a new sever to listen on. Our first server will run on port 5901 while the one we're now adding will listen on port 5902.

VNCSERVERARGS[2]="-geometry 1024x768"

# After you've saved those changes, we'll need to generate a VNC connection password for this new user

su vncuser2
vncpasswd

# Start and stop the VNC server for the desktop number 2

vncserver :2; vncserver -kill :2

# After we've generated the configuration file, we must edit it to that LXDE is loaded when we connect

nano ~/.vnc/xstartup

# Edit the file or replace its contents so that they look like the code below and save

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
lxsession -s LXDE &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &

# Drop back to root shell

exit

# Restart the server and you're done!

service vncserver restart

Further Securing your VNC Server

Since the VNC protocol transmits everything using plain-text, anyone who is potentially monitoring the connection between you and your server could see everything you are doing on your remote desktop. Luckily there is an easy way to secure your server by tunneling all your VNC traffic over an SSH session. To view this tutorial, click on this link.

Troubleshooting Tips

If you're server started correctly yet you're still having trouble connecting to it, check that your Firewall has proper exceptions to allow traffic on the VNC ports. Each VNC Server runs on a different port which is 590 + the number right after VNCSERVERARGS in your config. Our first server runs on 5901, second on 5902 and so forth.

To check your firewall configuration, login to your account at https://manage.myhosting.com and use the VPS Management tab to locate the Login to VZPP link. Here you can edit your firewall and use the Firewall Setup button to set the firewall mode to Advance firewall. If you set to default policy accept all traffic will be let through. If you select default policy Drop you will need to add Accept  rules for those ports using the TCP protocol.

Rss Comments 2
  • #
    [Support]: 2013-03-09 23:34

    This generally happens when fail2ban logs too many failed login attempts from your IP address try adding your local IP to the ignoreip = in your jail.conf under /etc/fail2ban

  • #
    [ skid]: Too many Authentication Failures??? 2013-03-03 03:23

    I often can not login to vnc using tightvnc. there are no authentication box, but there are error message "Too many Authentication Failures"
    What can i do???

Info Add Comment
Nickname: Your Email: Subject: Comment:
0.005014181137085
SELECT `sys_settings`.`var_name`, `sys_settings`.`var_value` FROM `sys_settings`
0.00047802925109863
SELECT `languages`.`lang_id` FROM `languages` WHERE (lang = 'def')
0.0080089569091797
SELECT `languages_vars`.`language_var`, `languages_vars`.`value` FROM `languages_vars` WHERE (lang_id = 1) AND (type != 'notification')
0.0072338581085205
SELECT `languages_vars`.`language_var`, `languages_vars`.`value` FROM `languages_vars` WHERE (lang_id = 1) AND (type != 'notification')
0.0007319450378418
SELECT `sys_settings`.`var_value` FROM `sys_settings` WHERE (var_name = 'session_life_time_unlimited')
0.00091099739074707
SELECT `ac`.`auto_relate`, `ac`.`max_staff_users`, `ac`.`max_client_users`, `ac`.`name`, (SELECT COUNT(*) FROM `users` WHERE (account_id = 2) AND (ldap_user = 'Y')) AS `ldap_users_num` FROM `accounts` AS `ac` WHERE (ac.account_id = 2)
0.00087404251098633
SELECT COUNT(us.user_id) FROM `users` AS `us` WHERE (type   = 'staff') AND (active = 'Y') AND (account_id = 2) AND ((SELECT COUNT(*) FROM `users_groups` AS `ug` WHERE (ug.user_id = us.user_id)) > 0) AND (login != 'sales@web-site-scripts.com')
0.00051999092102051
SELECT COUNT(us.user_id) FROM `users` AS `us` WHERE (type   = 'client') AND (active = 'Y') AND (account_id = 2) AND ((SELECT COUNT(*) FROM `users_groups` AS `ug` WHERE (ug.user_id = us.user_id)) > 0) AND (login != 'sales@web-site-scripts.com')
0.00049805641174316
SELECT COUNT(us.user_id) FROM `users` AS `us` WHERE (account_id = 2) AND ((SELECT COUNT(*) FROM `users_groups` AS `ug` WHERE (ug.user_id = us.user_id)) = 0) AND (login != 'sales@web-site-scripts.com')
0.00051403045654297
SELECT COUNT(*) AS `count` FROM `accounts` WHERE (LOWER(name) != 'preview')
0.00047707557678223
SELECT `accounts`.`name` FROM `accounts` WHERE (LOWER(name) != 'preview') ORDER BY `account_id` ASC LIMIT 1
0.0010049343109131
SELECT `view_manage`.`view_id`, `view_manage`.`name` FROM `view_manage` WHERE (type       = 'Hosted') AND (account_id = 2)
0.0011041164398193
SELECT `vm`.`view_id` AS `id`, `vm`.`name`, `vm`.`type`, `vm`.`hash`, `vm`.`settings` AS `tabs`, `vm`.`style_id` AS `styles`, `vm`.`gmt`, `vm`.`time_format`, `vm`.`date_format`, `vm`.`lang_id`, `vm`.`status`, `vm`.`access_mode`, `vm`.`voting_id` AS `voting`, `g`.`offset` AS `gmt_offset` FROM `view_manage` AS `vm`
 LEFT JOIN `gmt` AS `g` ON g.gmt_id = vm.gmt WHERE (view_id = 2)
0.0004889965057373
SELECT `votings`.`voting_id` AS `value`, `votings`.`voting_name` AS `text` FROM `votings` WHERE (account_id = 2) OR (system = 'Y') ORDER BY `voting_name` ASC
0.0034561157226562
SELECT `tpl`.`theme_id`, `tpl`.`theme_name`, `tpl`.`based_on`, `tpl`.`system`, CASE WHEN ((vm.style_id = tpl.copy_of_theme OR vm.style_id = tpl.theme_id) AND vm.account_id = 2) THEN 'Y' ELSE  'N' END AS `current` FROM `tpl_themes` AS `tpl`
 LEFT JOIN `view_manage` AS `vm` ON (vm.style_id = tpl.copy_of_theme OR vm.style_id = tpl.theme_id) AND vm.type = 'Hosted'  AND vm.account_id = 2 WHERE (tpl.account_id = 1 AND tpl.copy = 'N' AND tpl.system = 'Y') OR (tpl.account_id = 2 AND copy = 'N' AND tpl.system = 'N') ORDER BY `theme_name` ASC
0.00076913833618164
SELECT `votings`.* FROM `votings` WHERE (voting_id = 1)
0.00052690505981445
SELECT `voting_items`.`item_title` AS `title`, `voting_items`.`value` FROM `voting_items` WHERE (voting_id = 1) ORDER BY `value` DESC
0.0021259784698486
SELECT `view_styles`.* FROM `view_styles` WHERE (style_id = 4)
0.00082802772521973
SELECT `view_elements_styles`.`element_name` AS `name`, `view_elements_styles`.`element_type` AS `style` FROM `view_elements_styles` WHERE (style_id = 4) ORDER BY `element_name` ASC
0.00055313110351562
SELECT `languages`.`name` AS `text`, `languages`.`lang_id` AS `value` FROM `languages` WHERE (status = 'on') AND (lang != 'def') ORDER BY `lang_id` ASC
0.0010120868682861
SELECT `gmt`.* FROM `gmt` ORDER BY `offset` ASC
0.00067019462585449
SELECT `view_manage`.`view_id` AS `id`, `view_manage`.`hash`, `view_manage`.`status`, `view_manage`.`lang_id`, `view_manage`.`name` FROM `view_manage` WHERE (account_id = 2) AND (type = 'HOSTED') LIMIT 1
0.0011470317840576
SELECT `view_manage`.`view_id`, `view_manage`.`name` FROM `view_manage` WHERE (type       = 'Hosted') AND (account_id = 2)
0.00097990036010742
SELECT `view_manage`.`settings` FROM `view_manage` WHERE (view_id = 2)
0.0006411075592041
UPDATE `view_manage` SET `views_num` = views_num + 1, `last_view_date` = ? WHERE (view_id = 2)
0.00056600570678711
SELECT `faq_articles`.`faq_id` FROM `faq_articles` WHERE (code = 'AA-04694') AND (account_id = 2) AND (status = 'moderated')
0.00056719779968262
DROP TABLE IF EXISTS `tmp_visible_articles_20101`;
0.00053787231445312
DROP TABLE IF EXISTS `tmp_visible_articles_20101`;
0.00066518783569336
CREATE TEMPORARY TABLE `tmp_visible_articles_20101` (`faq_id` int PRIMARY KEY) ENGINE=MEMORY
0.10696911811829
INSERT INTO `tmp_visible_articles_20101` SELECT `faq`.`faq_id` AS `id` FROM `faq_articles` AS `faq` USE INDEX (`PRIMARY`) WHERE (account_id = 2) AND (freeAccess = 'Y') AND (draft = 'N') AND (status = 'moderated') AND ( `public` = 'Y' AND
                                ((public_start_date <= '2013-05-23 23:18:44' OR public_start_date IS NULL)
                                    AND
                                  (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:44')
                                ))
0.001856803894043
SELECT `tmp_visible_articles_20101`.`faq_id` FROM `tmp_visible_articles_20101`
0.044486999511719
SELECT `far`.`faq_id` AS `faqId`, `far`.`featured`, `far`.`question`, `far`.`views`, `far`.`rating`, `far`.`faq_date`, `far`.`status_change_date` FROM `faq_articles` AS `far`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON far.faq_id = tmp.faq_id WHERE (draft = 'N') AND (far.featured = 'Y') ORDER BY `far`.`status_change_date` DESC, `faqId` DESC LIMIT 10
0.0022270679473877
SELECT `fa`.`faq_id` AS `faqId`, `fa`.`question`, `fa`.`code`, `fa`.`views`, `fa`.`rating`, `fa`.`featured`, `fa`.`answer`, CASE
                                            WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:44') OR (public_start_date IS NULL))
                                                    AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:44')))
                                            THEN 'Y'
                                            ELSE 'N'
                                        END  AS `public`, `fa`.`faq_date` AS `date`, `fa`.`status_change_date` AS `lastEditDate`, `fa`.`public_start_date` AS `publicStartDate` FROM `faq_articles` AS `fa` WHERE (fa.faq_id IN (4584,4814,4815,4816,4596,3565)) AND (fa.status = 'moderated') ORDER BY `fa`.`status_change_date` DESC, `faq_id` DESC
0.00075793266296387
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4584)
0.00049209594726562
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 8)
0.0005791187286377
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 17)
0.00054502487182617
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 8)
0.00050902366638184
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 35)
0.00050806999206543
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 17)
0.0006098747253418
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 37)
0.00070500373840332
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 35)
0.00049090385437012
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 206)
0.00079584121704102
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 200)
0.00056886672973633
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 221)
0.00064516067504883
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 207)
0.00058579444885254
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 354)
0.00052499771118164
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 205)
0.00048303604125977
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 355)
0.00060892105102539
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4814)
0.0020411014556885
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 368)
0.00049090385437012
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4815)
0.0007929801940918
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4816)
0.00069499015808105
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4596)
0.0007469654083252
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 356)
0.00068807601928711
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 34)
0.00067615509033203
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 3565)
0.0004889965057373
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 284)
0.00051593780517578
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 315)
0.00042891502380371
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 215)
0.00075292587280273
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 212)
0.051069974899292
SELECT `far`.`faq_id` AS `faqId`, `far`.`featured`, `far`.`question`, `far`.`views`, `far`.`rating`, `far`.`faq_date`, `far`.`status_change_date` FROM `faq_articles` AS `far`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON far.faq_id = tmp.faq_id WHERE (draft = 'N') ORDER BY `far`.`views` DESC, `faqId` DESC LIMIT 10
0.0045499801635742
SELECT `fa`.`faq_id` AS `faqId`, `fa`.`question`, `fa`.`code`, `fa`.`views`, `fa`.`rating`, `fa`.`featured`, `fa`.`answer`, CASE
                                            WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:45') OR (public_start_date IS NULL))
                                                    AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:45')))
                                            THEN 'Y'
                                            ELSE 'N'
                                        END  AS `public`, `fa`.`faq_date` AS `date`, `fa`.`status_change_date` AS `lastEditDate`, `fa`.`public_start_date` AS `publicStartDate` FROM `faq_articles` AS `fa` WHERE (fa.faq_id IN (1064,1094,845,4584,1061,510,4614,842,698,907)) AND (fa.status = 'moderated') ORDER BY `fa`.`views` DESC, `faq_id` DESC
0.00060701370239258
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 1064)
0.00059318542480469
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 147)
0.00060105323791504
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 357)
0.00072002410888672
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 1094)
0.00080299377441406
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 845)
0.00058102607727051
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 36)
0.00052189826965332
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 358)
0.00053095817565918
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 1061)
0.00097012519836426
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 510)
0.0004570484161377
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 183)
0.0014538764953613
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 182)
0.00064301490783691
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4614)
0.00051093101501465
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 842)
0.00071477890014648
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 698)
0.00062799453735352
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 19)
0.00044488906860352
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 9)
0.00046205520629883
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 907)
0.00052404403686523
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 142)
0.00073504447937012
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 33)
0.00045990943908691
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 16)
0.054574966430664
SELECT `far`.`faq_id` AS `faqId`, `far`.`featured`, `far`.`question`, `far`.`views`, `far`.`rating`, `far`.`faq_date`, `far`.`status_change_date` FROM `faq_articles` AS `far`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON far.faq_id = tmp.faq_id WHERE (draft = 'N') ORDER BY `far`.`rating` DESC, `faqId` DESC LIMIT 10
0.048795938491821
SELECT `fa`.`faq_id` AS `faqId`, `fa`.`question`, `fa`.`code`, `fa`.`views`, `fa`.`rating`, `fa`.`featured`, `fa`.`answer`, CASE
                                            WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:45') OR (public_start_date IS NULL))
                                                    AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:45')))
                                            THEN 'Y'
                                            ELSE 'N'
                                        END  AS `public`, `fa`.`faq_date` AS `date`, `fa`.`status_change_date` AS `lastEditDate`, `fa`.`public_start_date` AS `publicStartDate` FROM `faq_articles` AS `fa` WHERE (fa.faq_id IN (4625,4624,4614,4610,4584,4401,994,644,642,4873)) AND (fa.status = 'moderated') ORDER BY `fa`.`rating` DESC, `faq_id` DESC
0.00062298774719238
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4625)
0.00052094459533691
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4624)
0.00048589706420898
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 18)
0.0006248950958252
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 47)
0.00051784515380859
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 25)
0.00074887275695801
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 11)
0.00069499015808105
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 7)
0.00057411193847656
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 66)
0.0005638599395752
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 24)
0.00051212310791016
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4610)
0.00057101249694824
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4401)
0.00080394744873047
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 994)
0.00048303604125977
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 130)
0.00044012069702148
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 32)
0.00047898292541504
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 644)
0.00052809715270996
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 79)
0.00044584274291992
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 27)
0.00044608116149902
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 12)
0.00048398971557617
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 98)
0.0004580020904541
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 26)
0.00050806999206543
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 642)
0.000518798828125
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 81)
0.00058102607727051
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4873)
0.00046896934509277
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 247)
0.00050902366638184
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 246)
0.052040100097656
SELECT `far`.`faq_id` AS `faqId`, `far`.`featured`, `far`.`question`, `far`.`views`, `far`.`rating`, `far`.`faq_date`, `far`.`status_change_date` FROM `faq_articles` AS `far`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON far.faq_id = tmp.faq_id WHERE (draft = 'N') ORDER BY `far`.`real_creation_date` DESC, `faqId` DESC LIMIT 10
0.13089203834534
SELECT `fa`.`faq_id` AS `faqId`, `fa`.`question`, `fa`.`code`, `fa`.`views`, `fa`.`rating`, `fa`.`featured`, `fa`.`answer`, CASE
                                            WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:45') OR (public_start_date IS NULL))
                                                    AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:45')))
                                            THEN 'Y'
                                            ELSE 'N'
                                        END  AS `public`, `fa`.`faq_date` AS `date`, `fa`.`status_change_date` AS `lastEditDate`, `fa`.`public_start_date` AS `publicStartDate` FROM `faq_articles` AS `fa` WHERE (fa.faq_id IN (4873,4872,4871,4870,4869,4865,4864,4863,4862,4861)) AND (fa.status = 'moderated') ORDER BY `fa`.`real_creation_date` DESC, `faq_id` DESC
0.00082993507385254
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4872)
0.00058197975158691
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4871)
0.00076103210449219
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 371)
0.00071811676025391
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 210)
0.00054383277893066
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4870)
0.00056815147399902
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4869)
0.00063490867614746
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4865)
0.00046205520629883
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 231)
0.00049781799316406
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 209)
0.00098013877868652
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4864)
0.00071191787719727
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4863)
0.00054216384887695
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 312)
0.0005640983581543
SELECT `faq_categories`.`cat_name`, `faq_categories`.`cat_id`, `faq_categories`.`parent_id` FROM `faq_categories` WHERE (cat_id = 310)
0.00048017501831055
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4862)
0.00048589706420898
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4861)
0.0016381740570068
SELECT `far`.`faq_id` AS `faqId`, `far`.`code`, `far`.`email`, `far`.`public` AS `public_`, `far`.`draft`, `far`.`locked`, `far`.`answer`, `far`.`lock_user_id`, `far`.`question`, `far`.`status`, `far`.`featured`, `far`.`freeAccess`, UNIX_TIMESTAMP(far.lock_date) AS `lock_date`, `far`.`author` AS `author_id`, `far`.`editor` AS `editor_id`, `far`.`faq_date` AS `date`, `far`.`rating`, `far`.`views`, `far`.`public_start_date` AS `publicStartDate_`, `far`.`public_end_date` AS `publicEndDate_`, CASE
                                                                WHEN status_change_date IS NULL OR (status_change_date <= '1970-01-01 00:00:00')
                                                                THEN faq_date
                                                                ELSE status_change_date
                                                            END  AS `lastEditDate`, CASE
                                              WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:45') OR (public_start_date IS NULL))
                                                    AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:45')))
                                              THEN 'Y'
                                              ELSE 'N'
                                            END  AS `public`, `far`.`meta_keywords`, `far`.`meta_description`, `far`.`KEYWORD_JSGUI`, `far`.`KEYWORD_KMP`, `far`.`KEYWORD_JSGUI_URL`, `far`.`KEYWORD_KMP_URL`, CONCAT_WS(' ', us.fname,us.lname) AS `author_login`, CONCAT_WS(' ', us_e.fname,us_e.lname) AS `editor_login`, CONCAT_WS(' ', us_l.fname,us_l.lname) AS `lock_login`, (SELECT COUNT(*) FROM `faq_attachments` WHERE (faq_id = 4621)) AS `attaches` FROM `faq_articles` AS `far`
 LEFT JOIN `users` AS `us` ON far.author = us.user_id
 LEFT JOIN `users` AS `us_e` ON far.editor = us_e.user_id
 LEFT JOIN `users` AS `us_l` ON far.lock_user_id = us_l.user_id WHERE (far.faq_id = 4621) AND ( (far.`public` = 'Y' AND (((far.public_start_date <= '2013-05-23 23:18:45') OR (far.public_start_date IS NULL)) AND (far.public_end_date IS NULL OR far.public_end_date >= '2013-05-23 23:18:45')))) LIMIT 1
0.0011000633239746
SELECT `v_com`.`faq_vc_id` AS `v_com_id`, `v_com`.`visitor_subject` AS `v_com_subject`, `v_com`.`visitor_comment` AS `v_com_comment`, `v_com`.`visitor_comment_date` AS `v_com_date`, `v_com`.`nickname` AS `v_com_nick`, `v_com`.`email` AS `v_com_email`, `v_com`.`user_ip` AS `v_com_ip`, `u_com`.`faq_uc_id` AS `u_com_id`, `u_com`.`user_subject` AS `u_com_subject`, `u_com`.`user_comment` AS `u_com_comment`, `u_com`.`user_comment_date` AS `u_com_date`, CASE WHEN u_com.faq_uc_id IS NULL THEN 0 ELSE 1 END AS `nouser`, `usr`.`fname`, `usr`.`lname` FROM `faq_visitors_comments` AS `v_com`
 LEFT JOIN `faq_users_comments` AS `u_com` ON v_com.faq_vc_id = u_com.faq_vc_id
 LEFT JOIN `users` AS `usr` ON u_com.author_id = usr.user_id WHERE (v_com.faq_id = 4621) AND (v_com.comment_status != 'delete') AND (v_com.comment_status != 'new') ORDER BY `v_com_date` DESC, `u_com_date` ASC
0.00054693222045898
SELECT `faq_statistics`.`stat_id` AS `id`, `faq_statistics`.`feedback` AS `message`, `faq_statistics`.`stat_date` AS `date`, `faq_statistics`.`email`, `faq_statistics`.`rating` AS `voter` FROM `faq_statistics` WHERE (faq_id = 4621) AND (feedback NOT LIKE '')
0.0007479190826416
SELECT SQL_CALC_FOUND_ROWS `custom_fields`.`cf_id` AS `id`, `custom_fields`.`name`, `custom_fields`.`type`, `custom_fields`.`position`, `custom_fields`.`required`, `custom_fields`.`internal`, `custom_fields`.`hint`, `custom_fields`.`use_hint`, `custom_fields`.`listHeight`, `custom_fields`.`search_back`, `custom_fields`.`search_front`, `custom_fields`.`show_empty`, `custom_fields`.`WYSIWYG`, `custom_fields`.`optionsDelimiter`, `custom_fields`.`format`, `custom_fields`.`isLink` FROM `custom_fields` WHERE (account_id = 2) ORDER BY `position` ASC
0.00063991546630859
SELECT `cfa`.`cf_id`, `cfa`.`cf_o_id`, `cfa`.`value`, `cf`.`name`, `cf`.`optionsDelimiter`, `cf`.`internal`, `cf`.`type`, `cf`.`format`, `cf`.`position`, `cf`.`show_empty`, `cf`.`search_front` FROM `custom_fields_articles` AS `cfa`
 INNER JOIN `custom_fields` AS `cf` ON cf.cf_id = cfa.cf_id WHERE (cfa.faq_id = 4621) ORDER BY `cf_id` ASC
0.00073504447937012
SELECT `fc`.`cat_id`, `fc`.`cat_name`, `fc`.`account_id` FROM `articles_categories` AS `ac`
 LEFT JOIN `faq_categories` AS `fc` ON fc.cat_id = ac.category_id WHERE (ac.faq_id = 4621)
0.000823974609375
SELECT `fa`.`faq_id` AS `id`, `fa`.`views`, `fa`.`rating`, `fs`.`stat_id` AS `voters`, `fs`.`stat_date` AS `statDate` FROM `faq_articles` AS `fa`
 LEFT JOIN (SELECT `faq_statistics`.`faq_id`, MAX(stat_date) AS `stat_date`, COUNT(stat_id) AS `stat_id` FROM `faq_statistics` GROUP BY `faq_id`) AS `fs` ON fa.faq_id = fs.faq_id WHERE (fa.faq_id = 4621)
0.00091695785522461
SELECT SQL_CALC_FOUND_ROWS `us`.`user_id`, `us`.`allow_delete` AS `editable`, `us`.`type`, CASE WHEN (SELECT COUNT(user_id) FROM `users_groups` AS `ug` WHERE (ug.user_id = us.user_id)) > 0 THEN 'N' ELSE 'Y' END AS `unassigned`, `us`.`active`, `us`.`ldap_user`, `us`.`login`, `us`.`fname`, `us`.`lname`, `us`.`email`, CONCAT_WS(' ', us.fname,us.lname) AS `text` FROM `users` AS `us` WHERE (us.login != 'sales@web-site-scripts.com') AND (us.account_id = 2) AND (us.type = 'staff' AND us.active <> 'P' AND (SELECT COUNT(user_id) FROM `users_groups` AS `ug` WHERE (ug.user_id = us.user_id)) > 0) ORDER BY `login` ASC
0.00042200088500977
SELECT FOUND_ROWS()
0.00065493583679199
SELECT `fa`.`revision_id`, `fa`.`revision_date` AS `date`, CONCAT_WS(' ', us.fname,us.lname) AS `author`, CONCAT_WS(' ', us_e.fname,us_e.lname) AS `editor` FROM `faq_history` AS `fa`
 LEFT JOIN `users` AS `us` ON fa.author = us.user_id
 LEFT JOIN `users` AS `us_e` ON fa.editor = us_e.user_id WHERE (fa.faq_id = 4621) ORDER BY `date` DESC
0.0006411075592041
SELECT `faq_articles`.`freeAccess`, `faq_articles`.`account_id` FROM `faq_articles` WHERE (faq_id = 4621)
0.0012857913970947
SELECT DISTINCT `g`.`group_id`, `g`.`name`, `g`.`description`, `g`.`allow_delete` FROM `articles_categories` AS `ac`
 LEFT JOIN `groups_categories_permissions` AS `gcp` ON ac.category_id = gcp.category_id OR gcp.category_id = 0
 LEFT JOIN `groups` AS `g` ON g.group_id = gcp.group_id WHERE (ac.faq_id = 4621) AND (g.account_id = 2) ORDER BY `g`.`name` ASC
0.0070610046386719
SELECT COUNT(*) AS `num` FROM `drafts` WHERE (account_id = 2) AND (user_id = -1) AND (question NOT LIKE '' OR answer NOT LIKE '')
0.0073719024658203
SELECT `dr`.`faq_id`, `dr`.`draft_id`, `dr`.`draft_date`, `dr`.`question`, `dr`.`answer`, `fa`.`draft`, CONCAT_WS(' ', us.fname,us.lname) AS `author_login`, CONCAT_WS(' ', us_e.fname,us_e.lname) AS `editor_login` FROM `drafts` AS `dr`
 LEFT JOIN `faq_articles` AS `fa` ON dr.faq_id = fa.faq_id
 LEFT JOIN `users` AS `us` ON fa.author = us.user_id
 LEFT JOIN `users` AS `us_e` ON fa.editor = us_e.user_id WHERE (dr.faq_id = 4621) AND (dr.user_id = -1) AND ((fa.faq_date < dr.draft_date OR fa.status_change_date < dr.draft_date))
0.00071001052856445
UPDATE `faq_articles` SET `views` = ? WHERE (faq_id = 4621)
0.00054812431335449
SELECT `terms`.`term_id`, `terms`.`term`, `terms`.`term_description` AS `description` FROM `terms` WHERE (account_id = 2)
0.00055408477783203
SELECT SQL_CALC_FOUND_ROWS `faq_attachments`.`faq_attachment_id` AS `id`, `faq_attachments`.`attach_name` AS `name`, `faq_attachments`.`file_path` AS `path`, `faq_attachments`.`mime_type` AS `type`, `faq_attachments`.`file_name` FROM `faq_attachments` WHERE (faq_id = 4621) ORDER BY `name` ASC
0.00048208236694336
SELECT FOUND_ROWS()
0.024316072463989
SELECT `blackwords`.`blackword` FROM `blackwords` WHERE (account_id = 2)
0.00098109245300293
SELECT `g`.`group_id` AS `gid`, `g`.`name`, `g`.`allow_delete`, `g`.`description`, `g`.`type`, (SELECT COUNT(user_id) FROM `users_groups` AS `ug` WHERE (ug.group_id = g.group_id)) AS `users_count` FROM `groups` AS `g` WHERE (account_id = 2) ORDER BY `name` ASC
0.0054528713226318
SELECT `ac`.`category_id` FROM `articles_categories` AS `ac`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON ac.faq_id = tmp.faq_id UNION SELECT `fc`.`cat_id` AS `category_id` FROM `faq_categories` AS `fc` WHERE (fc.`public` = 'Y') AND (fc.account_id = 2)
0.015369176864624
SELECT `fc`.`cat_id` AS `id`, `fc`.`parent_id` AS `pid`, `fc`.`cat_name` AS `text`, `fc`.`position`, `fc`.`meta_keywords`, `fc`.`meta_description`, `fc`.`public`, CASE WHEN childCount.`count` IS NULL
                                                                                 THEN 0
                                                                                 ELSE childCount.`count`
                                                                             END  AS `childCount`, CASE WHEN totalArticles.`count` IS NULL
                                                                                    THEN 0
                                                                                    ELSE totalArticles.`count`
                                                                                END  AS `totalArticles` FROM `faq_categories` AS `fc`
 LEFT JOIN (SELECT `faq_categories`.`parent_id`, COUNT(cat_id) AS `count` FROM `faq_categories` GROUP BY `parent_id`) AS `childCount` ON childCount.parent_id = fc.cat_id
 LEFT JOIN (SELECT `ac`.`category_id`, COUNT(ac.faq_id) AS `count` FROM `articles_categories` AS `ac`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON ac.faq_id = tmp.faq_id GROUP BY `category_id`) AS `totalArticles` ON totalArticles.category_id = fc.cat_id WHERE (fc.account_id = 2) ORDER BY `fc`.`position` ASC, `fc`.`cat_name` ASC
0.00082492828369141
SELECT `gcp`.`category_id` FROM `users_groups` AS `ug`
 LEFT JOIN `groups_permissions` AS `gp` ON gp.group_id = ug.group_id
 LEFT JOIN `groups_categories_permissions` AS `gcp` ON gcp.group_id = gp.group_id WHERE (user_id = -1) AND (gp.permission = 'ActPrmCategoryCreateEdit') AND (gp.value = '1')
0.00071406364440918
SELECT `gcp`.`category_id` FROM `users_groups` AS `ug`
 LEFT JOIN `groups_permissions` AS `gp` ON gp.group_id = ug.group_id
 LEFT JOIN `groups_categories_permissions` AS `gcp` ON gcp.group_id = gp.group_id WHERE (user_id = -1) AND (gp.permission = 'ActPrmCategoryDelete') AND (gp.value = '1')
0.00070595741271973
SELECT `gcp`.`category_id` FROM `users_groups` AS `ug`
 LEFT JOIN `groups_permissions` AS `gp` ON gp.group_id = ug.group_id
 LEFT JOIN `groups_categories_permissions` AS `gcp` ON gcp.group_id = gp.group_id WHERE (user_id = -1) AND (gp.permission = 'ActPrmArticleCreateEdit') AND (gp.value = '1')
0.00058293342590332
SELECT `gcp`.`category_id` FROM `users_groups` AS `ug`
 LEFT JOIN `groups_permissions` AS `gp` ON gp.group_id = ug.group_id
 LEFT JOIN `groups_categories_permissions` AS `gcp` ON gcp.group_id = gp.group_id WHERE (user_id = -1) AND (gp.permission = 'ActPrmArticleDelete') AND (gp.value = '1')
0.0023281574249268
SELECT `fa`.`faq_id` AS `faqId`, `fa`.`question`, `fa`.`code`, `fa`.`featured`, `fa`.`rating`, `fa`.`views`, CASE
                                                     WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:45') OR (public_start_date IS NULL))
                                                            AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:45')))
                                                     THEN 'Y'
                                                     ELSE 'N'
                                                  END  AS `public`, `fa`.`faq_date` AS `date`, `fa`.`status_change_date` AS `lastEditDate`, `ac`.`category_id` FROM `faq_articles` AS `fa`
 INNER JOIN `tmp_visible_articles_20101` AS `tmp` ON fa.faq_id = tmp.faq_id
 LEFT JOIN `articles_categories` AS `ac` ON ac.faq_id = fa.faq_id WHERE (ac.category_id IN (8,17,35,36) ) ORDER BY `fa`.`featured` ASC, `fa`.`question` asc
0.00099515914916992
SELECT `tpl_layouts`.`layout_id`, `tpl_layouts`.`template` FROM `tpl_layouts` WHERE (theme_id = 4) AND (layout_name = 'Article')
0.0011940002441406
SELECT `lb`.`block_id`, `lbc`.`block_name`, `lbc`.`template` FROM `tpl_layouts_blocks` AS `lb`
 INNER JOIN `tpl_blocks` AS `lbc` ON lbc.block_id = lb.block_id WHERE (layout_id = 59)
0.0014829635620117
SELECT `tpl_snippets`.`template`, `tpl_snippets`.`snippet_name`, `tpl_snippets`.`block_id` FROM `tpl_snippets` WHERE (theme_id = 4)
0.00050711631774902
SELECT `languages`.`lang_id` FROM `languages` WHERE (lang = 'def')
0.0079240798950195
SELECT `languages_vars`.`language_var`, `languages_vars`.`value` FROM `languages_vars` WHERE (lang_id = 1) AND (type != 'notification')
0.0082547664642334
SELECT `languages_vars`.`language_var`, `languages_vars`.`value` FROM `languages_vars` WHERE (lang_id = 2) AND (type != 'notification')
Max Query Time:Query:
0.13089203834534
SELECT `fa`.`faq_id` AS `faqId`, `fa`.`question`, `fa`.`code`, `fa`.`views`, `fa`.`rating`, `fa`.`featured`, `fa`.`answer`, CASE
                                            WHEN (`public` = 'Y' AND (((public_start_date <= '2013-05-23 23:18:45') OR (public_start_date IS NULL))
                                                    AND (public_end_date IS NULL OR public_end_date >= '2013-05-23 23:18:45')))
                                            THEN 'Y'
                                            ELSE 'N'
                                        END  AS `public`, `fa`.`faq_date` AS `date`, `fa`.`status_change_date` AS `lastEditDate`, `fa`.`public_start_date` AS `publicStartDate` FROM `faq_articles` AS `fa` WHERE (fa.faq_id IN (4873,4872,4871,4870,4869,4865,4864,4863,4862,4861)) AND (fa.status = 'moderated') ORDER BY `fa`.`real_creation_date` DESC, `faq_id` DESC
Total SQL Time:Queries Num:
0.69252467155457
159